[Pkg-mozext-commits] [firebug] 76/82: issue6143: Resetting all options should also delete all include aliases

David Prévot taffit at moszumanska.debian.org
Mon Mar 31 22:45:42 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to tag fbtest-1.11.2
in repository firebug.

commit 932c5e55e1b77967c208a259dc17a6562e5547c0
Author: Florent FAYOLLE <florent.fayolle69 at gmail.com>
Date:   Wed Jan 2 19:16:42 2013 +0100

    issue6143: Resetting all options should also delete all include aliases
---
 .../content/firebug/console/commandLineInclude.js  | 26 ++++++++++++++++++++--
 1 file changed, 24 insertions(+), 2 deletions(-)

diff --git a/extension/content/firebug/console/commandLineInclude.js b/extension/content/firebug/console/commandLineInclude.js
index c5489b1..795f749 100644
--- a/extension/content/firebug/console/commandLineInclude.js
+++ b/extension/content/firebug/console/commandLineInclude.js
@@ -304,7 +304,7 @@ function CommandLineIncludeObject()
 
 // ********************************************************************************************* //
 
-var CommandLineInclude =
+var CommandLineInclude = Obj.extend(Firebug.module,
 {
     onSuccess: function(newAlias, context, loadingMsgRow, xhr)
     {
@@ -339,6 +339,14 @@ var CommandLineInclude =
     {
         if (!this.store)
             this.store = storageScope.StorageService.getStorage("includeAliases.json");
+
+        // let's log when the store could not be opened:
+        if (!this.store)
+        {
+            if (FBTrace.DBG_COMMANDLINE)
+                FBTrace.sysout("CommandLineInclude.getStore; can't open or create the store");
+        }
+
         return this.store;
     },
 
@@ -467,8 +475,20 @@ var CommandLineInclude =
         xhr.send(null);
 
         // xxxFlorent: TODO show XHR progress
+    },
+
+    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *  //
+    // Module events:
+
+    resetAllOptions: function()
+    {
+        var store = this.getStore();
+
+        if (!store)
+            return;
+        store.clear();
     }
-};
+});
 
 // ********************************************************************************************* //
 // Command Handler
@@ -536,6 +556,8 @@ Firebug.registerCommand("include", {
 
 Firebug.registerRep(CommandLineIncludeRep);
 
+Firebug.registerModule(CommandLineInclude);
+
 return CommandLineInclude;
 
 // ********************************************************************************************* //

-- 
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