зеркало из https://github.com/mozilla/gecko-dev.git
cdd79677c6
This matches the implementation of refcounting in C++ XPCOM objects. We'll end up crashing if the refcount being returned is too large. Change inc() and dec() to use try_into instead of as. This will change the behavior because we'll crash if the value is too large instead of silently truncating the return value, which might be worse because few callers actually use the return value, but is unlikely to matter. Also, use a more precise return type for the get() methods. It is only used by Rust code, so there's no need to be compatible with nsISupports. I made that change here to avoid needing to add a coercion from usize to nsrefcnt. Part of my goal with this patch is to eliminate an unnecessary use of nsrefcnt from Rust. Differential Revision: https://phabricator.services.mozilla.com/D159124 |
||
---|---|---|
.. | ||
base | ||
build | ||
components | ||
docs | ||
ds | ||
geckoprocesstypes_generator | ||
glue | ||
idl-parser | ||
io | ||
reflect | ||
rust | ||
string | ||
system | ||
tests | ||
threads | ||
windbgdlg | ||
xpidl | ||
moz.build | ||
xpcom-config.h.in |