[Pkg-mozext-commits] [firebug] 39/55: Support for http-on-examine-merged-response. This could help to solve issue 5550

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


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

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

commit 5d55b0131d2eeecd8a891d33337eb751904d7cff
Author: Jan Odvarko <odvarko at gmail.com>
Date:   Mon Jul 30 15:36:40 2012 +0200

    Support for http-on-examine-merged-response. This could help to solve issue 5550
---
 extension/content/firebug/cookies/cookieModule.js | 6 ++++++
 extension/content/firebug/cookies/httpObserver.js | 9 ++++++---
 extension/content/firebug/js/tabCache.js          | 2 ++
 extension/content/firebug/net/netMonitor.js       | 2 ++
 extension/content/firebug/net/requestObserver.js  | 5 ++++-
 extension/content/firebug/net/spy.js              | 5 ++++-
 extension/modules/firebug-http-observer.js        | 5 ++++-
 7 files changed, 28 insertions(+), 6 deletions(-)

diff --git a/extension/content/firebug/cookies/cookieModule.js b/extension/content/firebug/cookies/cookieModule.js
index 0015b05..7fd31c6 100644
--- a/extension/content/firebug/cookies/cookieModule.js
+++ b/extension/content/firebug/cookies/cookieModule.js
@@ -195,6 +195,9 @@ Firebug.CookieModule = Obj.extend(Firebug.ActivableModule,
 
         observerService.addObserver(HttpObserver, "http-on-modify-request", false);
         observerService.addObserver(HttpObserver, "http-on-examine-response", false);
+        observerService.addObserver(HttpObserver, "http-on-examine-cached-response", false);
+        observerService.addObserver(HttpObserver, "http-on-examine-merged-response", false);
+
         observerService.addObserver(PermissionObserver, "perm-changed", false);
         registerCookieObserver(CookieObserver);
         prefs.addObserver(networkPrefDomain, PrefObserver, false);
@@ -217,6 +220,9 @@ Firebug.CookieModule = Obj.extend(Firebug.ActivableModule,
 
         observerService.removeObserver(HttpObserver, "http-on-modify-request");
         observerService.removeObserver(HttpObserver, "http-on-examine-response");
+        observerService.removeObserver(HttpObserver, "http-on-examine-cached-response");
+        observerService.removeObserver(HttpObserver, "http-on-examine-merged-response");
+
         observerService.removeObserver(PermissionObserver, "perm-changed");
         unregisterCookieObserver(CookieObserver);
         prefs.removeObserver(networkPrefDomain, PrefObserver);
diff --git a/extension/content/firebug/cookies/httpObserver.js b/extension/content/firebug/cookies/httpObserver.js
index 541a6a8..58878e2 100644
--- a/extension/content/firebug/cookies/httpObserver.js
+++ b/extension/content/firebug/cookies/httpObserver.js
@@ -40,11 +40,14 @@ var HttpObserver = Obj.extend(BaseObserver,
     {
         try {
             aSubject = aSubject.QueryInterface(Ci.nsIHttpChannel);
-            if (aTopic == "http-on-modify-request") {
+            if (aTopic == "http-on-modify-request")
                 this.onModifyRequest(aSubject);
-            } else if (aTopic == "http-on-examine-response") {
+            else if (aTopic == "http-on-examine-response")
+                this.onExamineResponse(aSubject);
+            else if (aTopic == "http-on-examine-cached-response")
+                this.onExamineResponse(aSubject);
+            else if (aTopic == "http-on-examine-merged-response")
                 this.onExamineResponse(aSubject);
-            }
         }
         catch (err)
         {
diff --git a/extension/content/firebug/js/tabCache.js b/extension/content/firebug/js/tabCache.js
index a9ddd37..a608f5f 100644
--- a/extension/content/firebug/js/tabCache.js
+++ b/extension/content/firebug/js/tabCache.js
@@ -202,6 +202,8 @@ Firebug.TabCacheModel = Obj.extend(Firebug.ActivableModule,
                 this.onExamineResponse(subject, win);
             else if (topic == "http-on-examine-cached-response")
                 this.onCachedResponse(subject, win);
+            else if (topic == "http-on-examine-merged-response")
+                this.onCachedResponse(subject, win);
         }
         catch (err)
         {
diff --git a/extension/content/firebug/net/netMonitor.js b/extension/content/firebug/net/netMonitor.js
index b22cb8b..7ee1031 100644
--- a/extension/content/firebug/net/netMonitor.js
+++ b/extension/content/firebug/net/netMonitor.js
@@ -399,6 +399,8 @@ var NetHttpObserver =
                 this.onExamineResponse(subject, win, tabId, context);
             else if (topic == "http-on-examine-cached-response")
                 this.onExamineCachedResponse(subject, win, tabId, context);
+            else if (topic == "http-on-examine-merged-response")
+                this.onExamineCachedResponse(subject, win, tabId, context);
         }
         catch (err)
         {
diff --git a/extension/content/firebug/net/requestObserver.js b/extension/content/firebug/net/requestObserver.js
index c6d3125..f6c5c1b 100644
--- a/extension/content/firebug/net/requestObserver.js
+++ b/extension/content/firebug/net/requestObserver.js
@@ -49,6 +49,7 @@ var HttpRequestObserver =
             observerService.addObserver(this, "http-on-modify-request", false);
             observerService.addObserver(this, "http-on-examine-response", false);
             observerService.addObserver(this, "http-on-examine-cached-response", false);
+            observerService.addObserver(this, "http-on-examine-merged-response", false);
         }
 
         this.observing = true;
@@ -65,6 +66,7 @@ var HttpRequestObserver =
             observerService.removeObserver(this, "http-on-modify-request");
             observerService.removeObserver(this, "http-on-examine-response");
             observerService.removeObserver(this, "http-on-examine-cached-response");
+            observerService.removeObserver(this, "http-on-examine-merged-response");
         }
 
         this.observing = false;
@@ -83,7 +85,8 @@ var HttpRequestObserver =
             // Notify all registered observers.
             if (topic == "http-on-modify-request" ||
                 topic == "http-on-examine-response" ||
-                topic == "http-on-examine-cached-response")
+                topic == "http-on-examine-cached-response" ||
+                topic == "http-on-examine-merged-response")
             {
                 this.notifyObservers(subject, topic, data);
             }
diff --git a/extension/content/firebug/net/spy.js b/extension/content/firebug/net/spy.js
index b6bc9c8..eb0ac04 100644
--- a/extension/content/firebug/net/spy.js
+++ b/extension/content/firebug/net/spy.js
@@ -278,7 +278,8 @@ var SpyHttpObserver =
         {
             if (topic != "http-on-modify-request" &&
                 topic != "http-on-examine-response" &&
-                topic != "http-on-examine-cached-response")
+                topic != "http-on-examine-cached-response" &&
+                topic != "http-on-examine-merged-response")
             {
                 if (FBTrace.DBG_ERRORS || FBTrace.DBG_SPY)
                     FBTrace.sysout("spy.SpyHttpObserver.observe; ERROR Unknown topic: " + topic);
@@ -319,6 +320,8 @@ var SpyHttpObserver =
                     this.requestStopped(request, xhr, spyContext, requestMethod, requestName);
                 else if (topic == "http-on-examine-cached-response")
                     this.requestStopped(request, xhr, spyContext, requestMethod, requestName);
+                else if (topic == "http-on-examine-merged-response")
+                    this.requestStopped(request, xhr, spyContext, requestMethod, requestName);
 
                 return;
             }
diff --git a/extension/modules/firebug-http-observer.js b/extension/modules/firebug-http-observer.js
index 9e7aee6..8d52f9f 100644
--- a/extension/modules/firebug-http-observer.js
+++ b/extension/modules/firebug-http-observer.js
@@ -69,6 +69,7 @@ var httpRequestObserver =
             observerService.addObserver(this, "http-on-modify-request", false);
             observerService.addObserver(this, "http-on-examine-response", false);
             observerService.addObserver(this, "http-on-examine-cached-response", false);
+            observerService.addObserver(this, "http-on-examine-merged-response", false);
         }
 
         this.observing = true;
@@ -85,6 +86,7 @@ var httpRequestObserver =
             observerService.removeObserver(this, "http-on-modify-request");
             observerService.removeObserver(this, "http-on-examine-response");
             observerService.removeObserver(this, "http-on-examine-cached-response");
+            observerService.removeObserver(this, "http-on-examine-merged-response");
         }
 
         this.observing = false;
@@ -111,7 +113,8 @@ var httpRequestObserver =
             // Notify all registered observers.
             if (topic == "http-on-modify-request" ||
                 topic == "http-on-examine-response" ||
-                topic == "http-on-examine-cached-response")
+                topic == "http-on-examine-cached-response" ||
+                topic == "http-on-examine-merged-response")
             {
                 this.notifyObservers(subject, topic, data);
             }

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