forked from mirrors/gecko-dev
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 |
||
|---|---|---|
| .. | ||
| android | ||
| aom | ||
| atk | ||
| base | ||
| basetypes | ||
| docs | ||
| generic | ||
| html | ||
| interfaces | ||
| ipc | ||
| mac | ||
| other | ||
| tests | ||
| windows | ||
| xpcom | ||
| xul | ||
| moz.build | ||