gecko-dev/widget/android/jni
Makoto Kato b67709d926 Bug 1827386 - Part 1. NativeWeakPtr::Detach returns MozPromise to detect whether dispoer is finished. r=geckoview-reviewers,owlish
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
2023-05-09 05:13:32 +00:00
..
Accessors.h
Conversions.cpp Bug 1819311 - Collect errors on process launch r=nika,geckoview-reviewers,owlish 2023-04-13 08:35:24 +00:00
Conversions.h
GeckoBundleUtils.cpp Bug 1810761 - Add API to save a pdf file opened in pdf.js r=pdfjs-reviewers,geckoview-reviewers,marco,ohall,calu 2023-02-03 10:01:34 +00:00
GeckoBundleUtils.h Bug 1769290 - Part 26: Emit errors from JSHandleRootedTypedefChecker r=andi,geckoview-reviewers,owlish 2022-08-09 14:13:30 +00:00
GeckoResultUtils.h
moz.build Bug 1827386 - Part 1. NativeWeakPtr::Detach returns MozPromise to detect whether dispoer is finished. r=geckoview-reviewers,owlish 2023-05-09 05:13:32 +00:00
Natives.h Bug 1827386 - Part 1. NativeWeakPtr::Detach returns MozPromise to detect whether dispoer is finished. r=geckoview-reviewers,owlish 2023-05-09 05:13:32 +00:00
NativesInlines.h Bug 1827386 - Part 1. NativeWeakPtr::Detach returns MozPromise to detect whether dispoer is finished. r=geckoview-reviewers,owlish 2023-05-09 05:13:32 +00:00
Refs.h
TypeAdapter.h
Types.h
Utils.cpp
Utils.h