[Pkg-mozext-commits] [firebug] 52/68: issue6133: "Reset all options" should reset the default include() aliases
David Prévot
taffit at moszumanska.debian.org
Mon Mar 31 22:45:54 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to tag fbtest-1.11.4
in repository firebug.
commit cb0c49b39b0ca66228adb047fb6bc129b0455de1
Author: Florent FAYOLLE <florent.fayolle69 at gmail.com>
Date: Tue Apr 30 21:52:45 2013 +0200
issue6133: "Reset all options" should reset the default include() aliases
---
extension/content/firebug/console/commandLineInclude.js | 15 +++++++++------
extension/modules/storageService.js | 8 +++++++-
2 files changed, 16 insertions(+), 7 deletions(-)
diff --git a/extension/content/firebug/console/commandLineInclude.js b/extension/content/firebug/console/commandLineInclude.js
index a7faa96..9181bdf 100644
--- a/extension/content/firebug/console/commandLineInclude.js
+++ b/extension/content/firebug/console/commandLineInclude.js
@@ -42,8 +42,9 @@ catch(ex)
// Scratchpad does not exists (when using Seamonkey ...)
}
-var storageScope = {};
+var storageScope = {}, StorageService;
Cu.import("resource://firebug/storageService.js", storageScope);
+StorageService = storageScope.StorageService;
var defaultAliases = {
"jquery": "http://code.jquery.com/jquery-latest.js"
@@ -345,11 +346,11 @@ var CommandLineInclude = Obj.extend(Firebug.Module,
{
if (!this.store)
{
- var isNewStore = !storageScope.StorageService.hasStorage(storeFilename);
+ var isNewStore = !StorageService.hasStorage(storeFilename);
// Pass also the parent window to the new storage. The window will be
// used to figure out whether the browser is running in private mode.
// If yes, no data will be persisted.
- this.store = storageScope.StorageService.getStorage(storeFilename,
+ this.store = StorageService.getStorage(storeFilename,
Firebug.chrome.window);
// If the file did not exist, we put in there the default aliases.
@@ -512,9 +513,11 @@ var CommandLineInclude = Obj.extend(Firebug.Module,
resetAllOptions: function()
{
- var store = this.getStore();
- if (store)
- store.clear(true);
+ if (StorageService.hasStorage(storeFilename))
+ {
+ StorageService.removeStorage(storeFilename);
+ this.store = null;
+ }
}
});
diff --git a/extension/modules/storageService.js b/extension/modules/storageService.js
index d4e1b8a..10ac1c6 100644
--- a/extension/modules/storageService.js
+++ b/extension/modules/storageService.js
@@ -158,7 +158,7 @@ var StorageService =
removeStorage: function(leafName)
{
- ObjectPersister.deleteObject(leafname);
+ ObjectPersister.deleteObject(leafName);
},
hasStorage: function(leafName)
@@ -324,6 +324,12 @@ var ObjectPersister =
}
},
+ deleteObject: function(leafName)
+ {
+ var file = this.getFile(leafName);
+ return file.remove(false);
+ },
+
// xxxHonza: this entire method is duplicated from firebug/lib/privacy module
// As soon as this JSM is AMD we should just use firebug/lib/privacy.
isPrivateBrowsing: function(win)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/firebug.git
More information about the Pkg-mozext-commits
mailing list