Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Support for http-on-examine-merged-response. This could help to solve…

… issue 5550
  • Loading branch information...
commit 5d55b0131d2eeecd8a891d33337eb751904d7cff 1 parent 7c70124
Jan Odvarko authored July 30, 2012
6  extension/content/firebug/cookies/cookieModule.js
@@ -195,6 +195,9 @@ Firebug.CookieModule = Obj.extend(Firebug.ActivableModule,
195 195
 
196 196
         observerService.addObserver(HttpObserver, "http-on-modify-request", false);
197 197
         observerService.addObserver(HttpObserver, "http-on-examine-response", false);
  198
+        observerService.addObserver(HttpObserver, "http-on-examine-cached-response", false);
  199
+        observerService.addObserver(HttpObserver, "http-on-examine-merged-response", false);
  200
+
198 201
         observerService.addObserver(PermissionObserver, "perm-changed", false);
199 202
         registerCookieObserver(CookieObserver);
200 203
         prefs.addObserver(networkPrefDomain, PrefObserver, false);
@@ -217,6 +220,9 @@ Firebug.CookieModule = Obj.extend(Firebug.ActivableModule,
217 220
 
218 221
         observerService.removeObserver(HttpObserver, "http-on-modify-request");
219 222
         observerService.removeObserver(HttpObserver, "http-on-examine-response");
  223
+        observerService.removeObserver(HttpObserver, "http-on-examine-cached-response");
  224
+        observerService.removeObserver(HttpObserver, "http-on-examine-merged-response");
  225
+
220 226
         observerService.removeObserver(PermissionObserver, "perm-changed");
221 227
         unregisterCookieObserver(CookieObserver);
222 228
         prefs.removeObserver(networkPrefDomain, PrefObserver);
9  extension/content/firebug/cookies/httpObserver.js
@@ -40,11 +40,14 @@ var HttpObserver = Obj.extend(BaseObserver,
40 40
     {
41 41
         try {
42 42
             aSubject = aSubject.QueryInterface(Ci.nsIHttpChannel);
43  
-            if (aTopic == "http-on-modify-request") {
  43
+            if (aTopic == "http-on-modify-request")
44 44
                 this.onModifyRequest(aSubject);
45  
-            } else if (aTopic == "http-on-examine-response") {
  45
+            else if (aTopic == "http-on-examine-response")
  46
+                this.onExamineResponse(aSubject);
  47
+            else if (aTopic == "http-on-examine-cached-response")
  48
+                this.onExamineResponse(aSubject);
  49
+            else if (aTopic == "http-on-examine-merged-response")
46 50
                 this.onExamineResponse(aSubject);
47  
-            }
48 51
         }
49 52
         catch (err)
50 53
         {
2  extension/content/firebug/js/tabCache.js
@@ -202,6 +202,8 @@ Firebug.TabCacheModel = Obj.extend(Firebug.ActivableModule,
202 202
                 this.onExamineResponse(subject, win);
203 203
             else if (topic == "http-on-examine-cached-response")
204 204
                 this.onCachedResponse(subject, win);
  205
+            else if (topic == "http-on-examine-merged-response")
  206
+                this.onCachedResponse(subject, win);
205 207
         }
206 208
         catch (err)
207 209
         {
2  extension/content/firebug/net/netMonitor.js
@@ -399,6 +399,8 @@ var NetHttpObserver =
399 399
                 this.onExamineResponse(subject, win, tabId, context);
400 400
             else if (topic == "http-on-examine-cached-response")
401 401
                 this.onExamineCachedResponse(subject, win, tabId, context);
  402
+            else if (topic == "http-on-examine-merged-response")
  403
+                this.onExamineCachedResponse(subject, win, tabId, context);
402 404
         }
403 405
         catch (err)
404 406
         {
5  extension/content/firebug/net/requestObserver.js
@@ -49,6 +49,7 @@ var HttpRequestObserver =
49 49
             observerService.addObserver(this, "http-on-modify-request", false);
50 50
             observerService.addObserver(this, "http-on-examine-response", false);
51 51
             observerService.addObserver(this, "http-on-examine-cached-response", false);
  52
+            observerService.addObserver(this, "http-on-examine-merged-response", false);
52 53
         }
53 54
 
54 55
         this.observing = true;
@@ -65,6 +66,7 @@ var HttpRequestObserver =
65 66
             observerService.removeObserver(this, "http-on-modify-request");
66 67
             observerService.removeObserver(this, "http-on-examine-response");
67 68
             observerService.removeObserver(this, "http-on-examine-cached-response");
  69
+            observerService.removeObserver(this, "http-on-examine-merged-response");
68 70
         }
69 71
 
70 72
         this.observing = false;
@@ -83,7 +85,8 @@ var HttpRequestObserver =
83 85
             // Notify all registered observers.
84 86
             if (topic == "http-on-modify-request" ||
85 87
                 topic == "http-on-examine-response" ||
86  
-                topic == "http-on-examine-cached-response")
  88
+                topic == "http-on-examine-cached-response" ||
  89
+                topic == "http-on-examine-merged-response")
87 90
             {
88 91
                 this.notifyObservers(subject, topic, data);
89 92
             }
5  extension/content/firebug/net/spy.js
@@ -278,7 +278,8 @@ var SpyHttpObserver =
278 278
         {
279 279
             if (topic != "http-on-modify-request" &&
280 280
                 topic != "http-on-examine-response" &&
281  
-                topic != "http-on-examine-cached-response")
  281
+                topic != "http-on-examine-cached-response" &&
  282
+                topic != "http-on-examine-merged-response")
282 283
             {
283 284
                 if (FBTrace.DBG_ERRORS || FBTrace.DBG_SPY)
284 285
                     FBTrace.sysout("spy.SpyHttpObserver.observe; ERROR Unknown topic: " + topic);
@@ -319,6 +320,8 @@ var SpyHttpObserver =
319 320
                     this.requestStopped(request, xhr, spyContext, requestMethod, requestName);
320 321
                 else if (topic == "http-on-examine-cached-response")
321 322
                     this.requestStopped(request, xhr, spyContext, requestMethod, requestName);
  323
+                else if (topic == "http-on-examine-merged-response")
  324
+                    this.requestStopped(request, xhr, spyContext, requestMethod, requestName);
322 325
 
323 326
                 return;
324 327
             }
5  extension/modules/firebug-http-observer.js
@@ -69,6 +69,7 @@ var httpRequestObserver =
69 69
             observerService.addObserver(this, "http-on-modify-request", false);
70 70
             observerService.addObserver(this, "http-on-examine-response", false);
71 71
             observerService.addObserver(this, "http-on-examine-cached-response", false);
  72
+            observerService.addObserver(this, "http-on-examine-merged-response", false);
72 73
         }
73 74
 
74 75
         this.observing = true;
@@ -85,6 +86,7 @@ var httpRequestObserver =
85 86
             observerService.removeObserver(this, "http-on-modify-request");
86 87
             observerService.removeObserver(this, "http-on-examine-response");
87 88
             observerService.removeObserver(this, "http-on-examine-cached-response");
  89
+            observerService.removeObserver(this, "http-on-examine-merged-response");
88 90
         }
89 91
 
90 92
         this.observing = false;
@@ -111,7 +113,8 @@ var httpRequestObserver =
111 113
             // Notify all registered observers.
112 114
             if (topic == "http-on-modify-request" ||
113 115
                 topic == "http-on-examine-response" ||
114  
-                topic == "http-on-examine-cached-response")
  116
+                topic == "http-on-examine-cached-response" ||
  117
+                topic == "http-on-examine-merged-response")
115 118
             {
116 119
                 this.notifyObservers(subject, topic, data);
117 120
             }

0 notes on commit 5d55b01

Please sign in to comment.
Something went wrong with that request. Please try again.