Bug 1057966 - Fix Help menu in e10s windows. r=billm.
authorMike Conley <mconley@mozilla.com>
Fri, 29 Aug 2014 19:54:32 -0400
changeset 202613 5b89084d3dd65db7461998db03f554e614a59a79
parent 202612 47b9e8d327d927ff454ca6d1db5f1ddcb61144f6
child 202614 0239fbe8a0c8119fa37323c3143201a9e3d82ee1
push id27403
push userryanvm@gmail.com
push dateSat, 30 Aug 2014 16:40:31 +0000
treeherdermozilla-central@82e1c0a8c589 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1057966, 1051017
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1057966 - Fix Help menu in e10s windows. r=billm. The help menu wasn't populating properly because gSafeBrowsing was attempting to get the URI for the loaded page by getting content.document.documentURI. Since bug 1051017 landed, content is unavailable for e10s windows. We use the selected browser's currentURI instead.
--- a/browser/base/content/browser-safebrowsing.js
+++ b/browser/base/content/browser-safebrowsing.js
@@ -1,35 +1,34 @@
 # 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/.
 var gSafeBrowsing = {
   setReportPhishingMenu: function() {
     // A phishing page will have a specific about:blocked content documentURI
-    var isPhishingPage = content.document.documentURI.startsWith("about:blocked?e=phishingBlocked");
+    var uri = getBrowser().currentURI;
+    var isPhishingPage = uri && uri.spec.startsWith("about:blocked?e=phishingBlocked");
     // Show/hide the appropriate menu item.
             .hidden = isPhishingPage;
             .hidden = !isPhishingPage;
     var broadcasterId = isPhishingPage
                         ? "reportPhishingErrorBroadcaster"
                         : "reportPhishingBroadcaster";
     var broadcaster = document.getElementById(broadcasterId);
     if (!broadcaster)
-    var uri = getBrowser().currentURI;
     if (uri && (uri.schemeIs("http") || uri.schemeIs("https")))
       broadcaster.setAttribute("disabled", true);
    * Used to report a phishing page or a false positive