зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1351964 - Use UI thread for "Tabs:TabsOpened" event; r=sebastian
Use the UI thread for handling "Tabs:TabsOpened", so we don't race with other tab events that are already handled on the UI thread.
This commit is contained in:
Родитель
926495281b
Коммит
9a410052b9
|
@ -1780,11 +1780,11 @@ public abstract class GeckoApp
|
|||
public void run() {
|
||||
if (TabQueueHelper.TAB_QUEUE_ENABLED && TabQueueHelper.shouldOpenTabQueueUrls(GeckoApp.this)) {
|
||||
|
||||
getAppEventDispatcher().registerGeckoThreadListener(new BundleEventListener() {
|
||||
getAppEventDispatcher().registerUiThreadListener(new BundleEventListener() {
|
||||
@Override
|
||||
public void handleMessage(String event, GeckoBundle message, EventCallback callback) {
|
||||
if ("Tabs:TabsOpened".equals(event)) {
|
||||
getAppEventDispatcher().unregisterGeckoThreadListener(this, "Tabs:TabsOpened");
|
||||
getAppEventDispatcher().unregisterUiThreadListener(this, "Tabs:TabsOpened");
|
||||
openTabsRunnable.run();
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче