MCPcopy Create free account
hub / github.com/chromium/crashpad / AddSendRight

Method AddSendRight

tools/mac/exception_port_tool.cc:87–95  ·  view source on GitHub ↗

\brief Adds a send right to the pool. \param[in] send_right The send right to be added. The pool object takes its own reference to the send right, which remains valid until the pool object is destroyed. The caller remains responsible for its reference to the send right. It is possible and in fact likely that one pool will wind up owning the same send right multiple times. This is acceptable, bec

Source from the content-addressed store, hash-verified

85 //! same send right multiple times. This is acceptable, because send rights
86 //! are reference-counted.
87 void AddSendRight(mach_port_t send_right) {
88 kern_return_t kr = mach_port_mod_refs(mach_task_self(),
89 send_right,
90 MACH_PORT_RIGHT_SEND,
91 1);
92 MACH_CHECK(kr == KERN_SUCCESS, kr) << "mach_port_mod_refs";
93
94 send_rights_.push_back(send_right);
95 }
96
97 private:
98 std::vector<mach_port_t> send_rights_;

Callers 2

ShowBootstrapServiceFunction · 0.80
ShowExceptionPortsFunction · 0.80

Calls 1

push_backMethod · 0.45

Tested by

no test coverage detected