Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Back out Merge pull request #630 from ZER0/window.tabs/bug804935 for …

…causing debug failures.

This reverts commit f2c93bd, reversing
changes made to b205f22.
  • Loading branch information...
commit 532a51a324d7d91a61099877977ae50591286580 1 parent 02e0eef
Wes Kocher authored
Showing with 2 additions and 15 deletions.
  1. +1 −14 lib/sdk/tabs/helpers.js
  2. +1 −1  lib/sdk/tabs/tab-firefox.js
View
15 lib/sdk/tabs/helpers.js
@@ -5,8 +5,6 @@
const { getTabForContentWindow } = require('./utils');
const { Tab } = require('./tab');
-const { getOwnerWindow } = require('./utils');
-const { BrowserWindow } = require('../windows');
function getTabForWindow(win) {
let tab = getTabForContentWindow(win);
@@ -14,17 +12,6 @@ function getTabForWindow(win) {
if (!tab)
return null;
- let topWindow = getOwnerWindow(tab);
-
- return Tab({
- tab: tab,
- // Bring back this line for consistency. However it's actually not needed,
- // as soon as the `windows` module is included - even if it's not used -
- // the Tab will have the proper browser window assigned. That will be
- // eventually fixed when deprecated Trackers will be removed.
- //
- // See: https://bugzilla.mozilla.org/show_bug.cgi?id=804935
- window: BrowserWindow({ window: topWindow })
- });
+ return Tab({ tab: tab });
}
exports.getTabForWindow = getTabForWindow;
View
2  lib/sdk/tabs/tab-firefox.js
@@ -32,7 +32,7 @@ const TabTrait = Trait.compose(EventEmitter, {
constructor: function Tab(options) {
this._onReady = this._onReady.bind(this);
this._tab = options.tab;
- let window = this.window = options.window;
+ let window = this.window = options.window || getOwnerWindow(this._tab);
// Setting event listener if was passed.
for each (let type in EVENTS) {
Please sign in to comment.
Something went wrong with that request. Please try again.