Created
May 3, 2011 16:21
-
-
Save caisui/953652 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# HG changeset patch | |
# Parent 2183248b822c8bd6792990e0d52c7b25c63644d1 | |
diff --git a/common/modules/storage.jsm b/common/modules/storage.jsm | |
--- a/common/modules/storage.jsm | |
+++ b/common/modules/storage.jsm | |
@@ -274,6 +274,11 @@ | |
var storage = { | |
alwaysReload: {}, | |
newObject: function newObject(key, constructor, params) { | |
+ if (!params.reload && !params.store) { | |
+ let enumerator = Cc["@mozilla.org/appshell/window-mediator;1"].getService(Ci.nsIWindowMediator).getEnumerator("navigator:browser"); | |
+ params.reload = enumerator.hasMoreElements() && enumerator.getNext() && !enumerator.hasMoreElements(); | |
+ } | |
+ | |
if (!(key in keys) || params.reload || this.alwaysReload[key]) { | |
if (key in this && !(params.reload || this.alwaysReload[key])) | |
throw Error(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment