Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

… issue 5550
  • Loading branch information...
commit 5d55b0131d2eeecd8a891d33337eb751904d7cff 1 parent 7c70124
@janodvarko janodvarko authored
View
6 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);
View
9 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)
{
View
2  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)
{
View
2  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)
{
View
5 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);
}
View
5 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;
}
View
5 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);
}
Please sign in to comment.
Something went wrong with that request. Please try again.