Fix BrowserOnCommand() to use the correct content document for error pages in frames.
b=407369 r=gavin a=blocking-firefox3
--- 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",