Backed out changeset 7b1f88583896 (bug 1342207) for frequently failing browser_ext_tabs_onHighlighted.js. r=backout

This commit is contained in:
Sebastian Hengst
2017-04-13 18:09:13 +02:00
parent 30ee6d56e9
commit f26e7bf11f
3 changed files with 11 additions and 99 deletions

View File

@@ -156,7 +156,6 @@ class TabTracker extends TabTrackerBase {
windowTracker.addListener("TabClose", this);
windowTracker.addListener("TabOpen", this);
windowTracker.addListener("TabSelect", this);
windowTracker.addOpenListener(this._handleWindowOpen);
windowTracker.addCloseListener(this._handleWindowClose);
@@ -264,14 +263,6 @@ class TabTracker extends TabTrackerBase {
this.emitRemoved(nativeTab, false);
}
break;
case "TabSelect":
// Because we are delaying calling emitCreated above, we also need to
// delay sending this event because it shouldn't fire before onCreated.
Promise.resolve().then(() => {
this.emitActivated(nativeTab);
});
break;
}
}
@@ -317,9 +308,6 @@ class TabTracker extends TabTrackerBase {
for (let nativeTab of window.gBrowser.tabs) {
this.emitCreated(nativeTab);
}
// emitActivated to trigger tab.onActivated/tab.onHighlighted for a newly opened window.
this.emitActivated(window.gBrowser.tabs[0]);
}
}
@@ -341,19 +329,6 @@ class TabTracker extends TabTrackerBase {
}
}
/**
* Emits a "tab-activated" event for the given tab element.
*
* @param {NativeTab} nativeTab
* The tab element which has been activated.
* @private
*/
emitActivated(nativeTab) {
this.emit("tab-activated", {
tabId: this.getId(nativeTab),
windowId: windowTracker.getId(nativeTab.ownerGlobal)});
}
/**
* Emits a "tab-attached" event for the given tab element.
*