Permalink
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...
1 parent 02e0eef commit 532a51a324d7d91a61099877977ae50591286580 @KWierso KWierso committed Jan 4, 2013
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
@@ -5,26 +5,13 @@
const { getTabForContentWindow } = require('./utils');
const { Tab } = require('./tab');
-const { getOwnerWindow } = require('./utils');
-const { BrowserWindow } = require('../windows');
function getTabForWindow(win) {
let tab = getTabForContentWindow(win);
// We were unable to find the related tab!
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;
@@ -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) {

0 comments on commit 532a51a

Please sign in to comment.