Fix BrowserOnCommand() to use the correct content document for error pages in frames. b=407369 r=gavin a=blocking-firefox3
authorjohnath@mozilla.com
Thu, 13 Dec 2007 07:03:43 -0800
changeset 9009 de75a7f219089724c6411b1529a04f5deeb65828
parent 9008 cbeeb3286ef6fe33b6077a8eedaa6a3fa1c710f9
child 9010 f74b1a8d553044cf1138b43190e25d1d820fab82
push idunknown
push userunknown
push dateunknown
reviewersgavin, blocking-firefox3
bugs407369
milestone1.9b3pre
Fix BrowserOnCommand() to use the correct content document for error pages in frames. b=407369 r=gavin a=blocking-firefox3
browser/base/content/browser.js
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -2142,28 +2142,28 @@ function BrowserOnCommand(event) {
       if (ot == errorDoc.getElementById('exceptionDialogButton')) {
         var params = { exceptionAdded : false };
         
         try {
           switch (gPrefService.getIntPref("browser.ssl_override_behavior")) {
             case 2 : // Pre-fetch & pre-populate
               params.prefetchCert = true;
             case 1 : // Pre-populate
-              params.location = content.location.href;
+              params.location = errorDoc.location.href;
           }
         } catch (e) {
           Components.utils.reportError("Couldn't get ssl_override pref: " + e);
         }
         
         window.openDialog('chrome://pippki/content/exceptionDialog.xul',
                           '','chrome,centerscreen,modal', params);
         
         // If the user added the exception cert, attempt to reload the page
         if (params.exceptionAdded)
-          content.location.reload();
+          errorDoc.location.reload();
       }
       else if (ot == errorDoc.getElementById('getMeOutOfHereButton')) {
         // Redirect them to a known-functioning page, default start page
         var prefs = Cc["@mozilla.org/preferences-service;1"]
                     .getService(Ci.nsIPrefService).getDefaultBranch(null);
         var url = "about:blank";
         try {
           url = prefs.getComplexValue("browser.startup.homepage",