gecko-dev/mobile
Aaron Klotz c78829b682 Bug 1594820: Part 1 - Modify XPCOMEventTarget to accept method calls before JNI is ready; r=snorp
Since `XPCOMEventTarget` uses JNI, this patch makes it possible for consumers to
retrieve and invoke methods on one without needing to worry about whether JNI
is actually up yet.

To achieve this, we create the `IXPCOMEventTarget` interface, and observe that
both of its methods can be handled by a proxy if JNI is not ready:

* Calls to `dispatch` may be enqueued until JNI is up;
* Observe that, when JNI is not up yet, the result of `isOnCurrentThread`
  can never be `true`.

Once JNI is up and the event targets have been resolved, the proxies are
replaced with the real, concrete `XPCOMEventTarget`s and are no longer used for
the remainder of the Gecko instance's lifetime.

Differential Revision: https://phabricator.services.mozilla.com/D57837

--HG--
extra : moz-landing-system : lando
2020-01-20 07:44:07 +00:00
..
android Bug 1594820: Part 1 - Modify XPCOMEventTarget to accept method calls before JNI is ready; r=snorp 2020-01-20 07:44:07 +00:00
locales Bug 1601076 - Fix some broken BUG_COMPONENTS in moz.build files; r=jmaher 2019-12-04 13:55:45 +00:00