mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 13:21:05 +00:00
b67709d926
Actually, `NativeWeakPtr::Detach` may not release JNI ojbect immediately because it depends on JNI object's `OnWeakNonIntrusiveDetach`i implementation. `SessionAccessibility`'s `OnWeakNonIntrusiveDetach` implementation uses the runnable to run on Android UI thread then disposer runs on main thread, so if Detach is finished, JNI object isn't detached yet. If calling `NativeWeakPtrHolder::Attach` immediately with same/recycled Java object after `NettiveWeakPtr::Detach`, it is possible to run disposer for JNI object by `OnWeakNonIntrusiveDetach` after Attach is finished. So it may release newer attached object unfortunately. So I would like to add a way to waiting for detach JNI object using `MozPromise`. Also, `MozPromise.h` includes `Natives.h` header (for `GeckoResult` support). So I cannot modify inline method to use `MozPromise` due to recursive. So I split implementation with `NativesInlines.h` as workaround. Differential Revision: https://phabricator.services.mozilla.com/D175335 |
||
---|---|---|
.. | ||
Accessors.h | ||
Conversions.cpp | ||
Conversions.h | ||
GeckoBundleUtils.cpp | ||
GeckoBundleUtils.h | ||
GeckoResultUtils.h | ||
moz.build | ||
Natives.h | ||
NativesInlines.h | ||
Refs.h | ||
TypeAdapter.h | ||
Types.h | ||
Utils.cpp | ||
Utils.h |