зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1252650 - Send event response even if GeckoApp is not active; r=me
Enable sending event response when Gecko state is PROFILE_READY. This happens when Gecko is loaded in the background and GeckoApp is not active. This is safe because it's only a response to an event from Gecko, so there is definitely a listener for the response on the Gecko side already. r=me for a trivial change.
This commit is contained in:
Родитель
4018bd63a8
Коммит
983f3c49d1
|
@ -352,7 +352,8 @@ public final class EventDispatcher {
|
|||
if (ThreadUtils.isOnGeckoThread()) {
|
||||
GeckoAppShell.syncNotifyObservers(topic, wrapper.toString());
|
||||
} else {
|
||||
GeckoAppShell.notifyObservers(topic, wrapper.toString());
|
||||
GeckoAppShell.notifyObservers(topic, wrapper.toString(),
|
||||
GeckoThread.State.PROFILE_READY);
|
||||
}
|
||||
} catch (final JSONException e) {
|
||||
Log.e(LOGTAG, "Unable to send response", e);
|
||||
|
@ -397,7 +398,8 @@ public final class EventDispatcher {
|
|||
if (ThreadUtils.isOnGeckoThread()) {
|
||||
GeckoAppShell.syncNotifyObservers(topic, wrapper.toString());
|
||||
} else {
|
||||
GeckoAppShell.notifyObservers(topic, wrapper.toString());
|
||||
GeckoAppShell.notifyObservers(topic, wrapper.toString(),
|
||||
GeckoThread.State.PROFILE_READY);
|
||||
}
|
||||
} catch (final JSONException e) {
|
||||
Log.e(LOGTAG, "Unable to send response for: " + type, e);
|
||||
|
|
Загрузка…
Ссылка в новой задаче