[Pkg-mozext-commits] [firebug] 12/15: Do not use mutation events (related to 5768 and 2912)

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


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

taffit pushed a commit to tag firebug-1.10.5
in repository firebug.

commit 84c0ecb521569f7faa25f4ca3169b28df1bea9da
Author: Jan Odvarko <odvarko at gmail.com>
Date:   Thu Oct 18 08:16:05 2012 +0200

    Do not use mutation events (related to 5768 and 2912)
---
 extension/content/firebug/js/debugger.js | 50 --------------------------------
 1 file changed, 50 deletions(-)

diff --git a/extension/content/firebug/js/debugger.js b/extension/content/firebug/js/debugger.js
index 1190364..0f22dba 100644
--- a/extension/content/firebug/js/debugger.js
+++ b/extension/content/firebug/js/debugger.js
@@ -2561,58 +2561,11 @@ Firebug.Debugger = Obj.extend(Firebug.ActivableModule,
         }
         */
 
-        // context.watchScriptAdditions = Obj.bind(this.watchScriptAdditions, this, context);
-        // context.window.document.addEventListener("DOMNodeInserted", context.watchScriptAdditions, false);
-
         if (FBTrace.DBG_SOURCEFILES)
             FBTrace.sysout("debugger("+this.debuggerName+").loadedContext enabled on load: "+
                 context.onLoadWindowContent+" context.sourceFileMap", context.sourceFileMap);
     },
 
-    /*
-     * A DOM Mutation Event handler for script tag additions
-     * FAILS see http://code.google.com/p/fbug/issues/detail?id=2912
-     */
-    watchScriptAdditions: function(event, context)
-    {
-        if (event.type !== "DOMNodeInserted")
-            return;
-
-        if (event.target.tagName.toLowerCase() !== "script")
-            return;
-
-        FBTrace.sysout("debugger.watchScriptAdditions ", event.target.innerHTML);
-        var location = Win.safeGetWindowLocation(context.window);
-
-        jsd.enumerateScripts({enumerateScript: function(script)
-        {
-            if (Url.normalizeURL(script.fileName) === location)
-            {
-                var sourceFile = Firebug.SourceFile.getSourceFileByScript(context, script);
-                FBTrace.sysout('debugger.watchScriptAdditions '+script.tag+" in "+
-                    (sourceFile?sourceFile.href:"NONE")+" "+script.functionSource,
-                    script.functionSource);
-                // The dynamically added script tags via element.appendChild do not show up.
-            }
-        }});
-
-        if (context.pendingScriptTagSourceFile)
-        {
-            var sourceFile = context.pendingScriptTagSourceFile;
-            sourceFile.scriptTag = event.target;
-            sourceFile.source = Str.splitLines(event.target.innerHTML);
-
-            var panel = context.getPanel("script", true);
-            if (panel)
-                panel.removeSourceBoxBySourceFile(sourceFile);
-
-            FBTrace.sysout("debugger.watchScriptAdditions connected tag to sourcefile",
-                sourceFile);
-
-            delete context.pendingScriptTagSourceFile;
-        }
-    },
-
     // clean up the source file map in case the frame is being reloaded.
     unwatchWindow: function(context, win)
     {
@@ -2639,9 +2592,6 @@ Firebug.Debugger = Obj.extend(Firebug.ActivableModule,
     {
         Firebug.ActivableModule.destroyContext.apply(this, arguments);
 
-        Events.removeEventListener(context.window.document, "DOMNodeInserted",
-            context.watchScriptAdditions, false);
-
         if (context.stopped)
         {
             // the abort will call resume, but the nestedEventLoop would continue the load...

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