Bug 682944 - Prevent snippets with iframes from breaking about:home. r=gavin

This commit is contained in:
Alice0775 White 2012-06-13 15:44:28 -07:00
parent f89b7d1d24
commit 3a82d14a97
2 changed files with 4 additions and 2 deletions

View File

@ -4421,7 +4421,9 @@ var TabsProgressListener = {
Components.isSuccessCode(aStatus) &&
/^about:/.test(aWebProgress.DOMWindow.document.documentURI)) {
aBrowser.addEventListener("click", BrowserOnClick, false);
aBrowser.addEventListener("pagehide", function onPageHide() {
aBrowser.addEventListener("pagehide", function onPageHide(event) {
if (event.target.defaultView.frameElement)
return;
aBrowser.removeEventListener("click", BrowserOnClick, false);
aBrowser.removeEventListener("pagehide", onPageHide, true);
}, true);

View File

@ -862,7 +862,7 @@ let AboutHomeUtils = {
loadSnippetsURL: function AHU_loadSnippetsURL()
{
const STARTPAGE_VERSION = 2;
const STARTPAGE_VERSION = 3;
let updateURL = Services.prefs
.getCharPref(this.SNIPPETS_URL_PREF)
.replace("%STARTPAGE_VERSION%", STARTPAGE_VERSION);