Backed out changeset e23d0660a042 (bug 1218364) for mulet bustage
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Fri, 13 Nov 2015 12:32:15 +0100
changeset 308709 2164981a754ebace64225a68f79e67eba09f9fce
parent 308708 d70d6466d7eb490018c47ed2a2f3c9f457209999
child 308710 d9813cc43ecc5ff5fdfdd8327a49ac0e82eaf64a
push id7514
push users.kaspari@gmail.com
push dateFri, 13 Nov 2015 14:12:41 +0000
bugs1218364
milestone45.0a1
backs oute23d0660a042e6a00a1de55667cc9b30c63620d7
Backed out changeset e23d0660a042 (bug 1218364) for mulet bustage
gfx/layers/client/ClientLayerManager.cpp
gfx/tests/browser/browser.ini
gfx/tests/browser/browser_windowless_troubleshoot_crash.js
gfx/tests/moz.build
toolkit/modules/Troubleshoot.jsm
--- a/gfx/layers/client/ClientLayerManager.cpp
+++ b/gfx/layers/client/ClientLayerManager.cpp
@@ -755,17 +755,16 @@ ClientLayerManager::ClearLayer(Layer* aL
     ClearLayer(child);
   }
 }
 
 void
 ClientLayerManager::GetBackendName(nsAString& aName)
 {
   switch (mForwarder->GetCompositorBackendType()) {
-    case LayersBackend::LAYERS_NONE: aName.AssignLiteral("None"); return;
     case LayersBackend::LAYERS_BASIC: aName.AssignLiteral("Basic"); return;
     case LayersBackend::LAYERS_OPENGL: aName.AssignLiteral("OpenGL"); return;
     case LayersBackend::LAYERS_D3D9: aName.AssignLiteral("Direct3D 9"); return;
     case LayersBackend::LAYERS_D3D11: {
 #ifdef XP_WIN
       if (gfxWindowsPlatform::GetPlatform()->IsWARP()) {
         aName.AssignLiteral("Direct3D 11 WARP");
       } else {
deleted file mode 100644
--- a/gfx/tests/browser/browser.ini
+++ /dev/null
@@ -1,4 +0,0 @@
-[DEFAULT]
-support-files =
-
-[browser_windowless_troubleshoot_crash.js]
deleted file mode 100644
--- a/gfx/tests/browser/browser_windowless_troubleshoot_crash.js
+++ /dev/null
@@ -1,43 +0,0 @@
-let { Services } = Cu.import("resource://gre/modules/Services.jsm", {});
-
-add_task(function* test_windowlessBrowserTroubleshootCrash() {
-  let webNav = Services.appShell.createWindowlessBrowser(false);
-
-  let onLoaded = new Promise((resolve, reject) => {
-    let docShell = webNav.QueryInterface(Ci.nsIInterfaceRequestor)
-                         .getInterface(Ci.nsIDocShell);
-    let listener = {
-      observe(contentWindow, topic, data) {
-        let observedDocShell = contentWindow.QueryInterface(Ci.nsIInterfaceRequestor)
-                                            .getInterface(Ci.nsIWebNavigation)
-                                            .QueryInterface(Ci.nsIDocShellTreeItem)
-                                            .sameTypeRootTreeItem
-                                            .QueryInterface(Ci.nsIDocShell);
-          if (docShell === observedDocShell) {
-            Services.obs.removeObserver(listener, "content-document-global-created", false);
-            resolve();
-          }
-        }
-    }
-    Services.obs.addObserver(listener, "content-document-global-created", false);
-  });
-  webNav.loadURI("about:blank", 0, null, null, null);
-
-  yield onLoaded;
-
-  let winUtils = webNav.document.defaultView.
-                        QueryInterface(Ci.nsIInterfaceRequestor).
-                        getInterface(Ci.nsIDOMWindowUtils);
-  is(winUtils.layerManagerType, "None", "windowless browser's layerManagerType should be 'None'");
-
-  ok(true, "not crashed");
-
-  var Troubleshoot = Cu.import("resource://gre/modules/Troubleshoot.jsm", {}).Troubleshoot;
-  var data = yield new Promise((resolve, reject) => {
-    Troubleshoot.snapshot((data) => {
-      resolve(data);
-    });
-  });
-
-  ok(data.graphics.windowLayerManagerType !== "None", "windowless browser window should not set windowLayerManagerType to 'None'");
-});
--- a/gfx/tests/moz.build
+++ b/gfx/tests/moz.build
@@ -1,9 +1,8 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
 MOCHITEST_MANIFESTS += ['mochitest/mochitest.ini']
-BROWSER_CHROME_MANIFESTS += ['browser/browser.ini']
--- a/toolkit/modules/Troubleshoot.jsm
+++ b/toolkit/modules/Troubleshoot.jsm
@@ -302,25 +302,21 @@ var dataProviders = {
       var gfxInfo = Cc["@mozilla.org/gfx/info;1"].getService(Ci.nsIGfxInfo);
     }
     catch (e) {}
 
     data.numTotalWindows = 0;
     data.numAcceleratedWindows = 0;
     let winEnumer = Services.ww.getWindowEnumerator();
     while (winEnumer.hasMoreElements()) {
+      data.numTotalWindows++;
       let winUtils = winEnumer.getNext().
                      QueryInterface(Ci.nsIInterfaceRequestor).
                      getInterface(Ci.nsIDOMWindowUtils);
       try {
-        // NOTE: windowless browser's windows should not be reported in the graphics troubleshoot report
-        if (winUtils.layerManagerType == "None") {
-          continue;
-        }
-        data.numTotalWindows++;
         data.windowLayerManagerType = winUtils.layerManagerType;
         data.windowLayerManagerRemote = winUtils.layerManagerRemote;
         data.supportsHardwareH264 = winUtils.supportsHardwareH264Decoding;
       }
       catch (e) {
         continue;
       }
       if (data.windowLayerManagerType != "Basic")