gecko-dev/mobile
Agi Sferro db6763404e Bug 1675644 - Flush extension messages per-session and per-nativeApp. r=esawin
The extension code _tries_ to flush messages when the relevant delegate is attached.

The logic, however, is pretty flawed: we currently only flush runtime-messages
(i.e. not coming from a WebExtension Page) and we flush all messages when the
first delegate is attached, even though there could be messages for different
nativeApp values which don't have a delegate attached yet.

We also erroneusly return a rejected promise to javascript when a message is queued up.

This patch addresses the above by:

- Never rejecting a pending connection request, the connection request will be
  resolved when the delegate for the right nativeApp is attached.
- Making the pending messages queue per-nativeApp and per-session.
- Flushing pending messages when a session delegate is attached.

Differential Revision: https://phabricator.services.mozilla.com/D96645
2020-11-11 22:46:22 +00:00
..
android Bug 1675644 - Flush extension messages per-session and per-nativeApp. r=esawin 2020-11-11 22:46:22 +00:00
locales Bug 1654103: Standardize on Black for Python code in `mozilla-central`. 2020-10-26 18:34:53 +00:00
.eslintrc.js Bug 1632922 - use const instead of let - manual fixes. r=snorp 2020-04-24 21:53:19 +00:00