Backed out changeset 562dbcad5a6e (bug 1245355) for leaking windows and a docshell in its new test browser_ext_tabs_getAllInWindow.js. r=backout
authorSebastian Hengst <archaeopteryx@coole-files.de>
Wed, 16 Mar 2016 19:19:41 +0100
changeset 289072 03bf161a225ef373df1e03e76525d95522916916
parent 289071 7afcc6cf189d172c6c754b4a5645b9659598ebb1
child 289073 4116cafbb87dd251990450f8f90911beecbe0859
push id19656
push usergwagner@mozilla.com
push dateMon, 04 Apr 2016 13:43:23 +0000
treeherderb2g-inbound@e99061fde28a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1245355
milestone48.0a1
backs out562dbcad5a6e32ad1a1bfa544f83c62066cd4dbf
Backed out changeset 562dbcad5a6e (bug 1245355) for leaking windows and a docshell in its new test browser_ext_tabs_getAllInWindow.js. r=backout
browser/components/extensions/ext-tabs.js
browser/components/extensions/test/browser/browser.ini
browser/components/extensions/test/browser/browser_ext_tabs_getAllInWindow.js
--- a/browser/components/extensions/ext-tabs.js
+++ b/browser/components/extensions/ext-tabs.js
@@ -538,18 +538,21 @@ extensions.registerSchemaAPI("tabs", nul
         let tab;
         if (context.tabId) {
           tab = TabManager.convert(extension, TabManager.getTab(context.tabId));
         }
         return Promise.resolve(tab);
       },
 
       getAllInWindow: function(windowId) {
-        let window = WindowManager.getWindow(windowId, context);
-        return Promise.resolve(TabManager.for(extension).getTabs(window));
+        if (windowId === null) {
+          windowId = WindowManager.topWindow.windowId;
+        }
+
+        return self.tabs.query({windowId});
       },
 
       query: function(queryInfo) {
         let pattern = null;
         if (queryInfo.url !== null) {
           pattern = new MatchPattern(queryInfo.url);
         }
 
--- a/browser/components/extensions/test/browser/browser.ini
+++ b/browser/components/extensions/test/browser/browser.ini
@@ -35,17 +35,16 @@ support-files =
 [browser_ext_tabs_detectLanguage.js]
 [browser_ext_tabs_events.js]
 [browser_ext_tabs_executeScript.js]
 [browser_ext_tabs_executeScript_good.js]
 [browser_ext_tabs_executeScript_bad.js]
 [browser_ext_tabs_executeScript_runAt.js]
 [browser_ext_tabs_insertCSS.js]
 [browser_ext_tabs_query.js]
-[browser_ext_tabs_getAllInWindow.js]
 [browser_ext_tabs_getCurrent.js]
 [browser_ext_tabs_create.js]
 [browser_ext_tabs_create_invalid_url.js]
 [browser_ext_tabs_duplicate.js]
 [browser_ext_tabs_update.js]
 [browser_ext_tabs_update_url.js]
 [browser_ext_tabs_onUpdated.js]
 [browser_ext_tabs_sendMessage.js]
deleted file mode 100644
--- a/browser/components/extensions/test/browser/browser_ext_tabs_getAllInWindow.js
+++ /dev/null
@@ -1,22 +0,0 @@
-/* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set sts=2 sw=2 et tw=80: */
-"use strict";
-
-add_task(function* () {
-  let extension = ExtensionTestUtils.loadExtension({
-    manifest: {
-      "permissions": ["tabs"],
-    },
-
-    background: function() {
-      browser.tabs.getAllInWindow(browser.windows.WINDOW_ID_CURRENT, tabs => {
-        browser.test.assertEq(1, tabs.length, "There should be only 1 tab in the window");
-        browser.test.notifyPass("tabs.getAllInWindow");
-      });
-    },
-  });
-
-  yield extension.startup();
-  yield extension.awaitFinish("tabs.getAllInWindow");
-  yield extension.unload();
-});