Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: lib/windowObserver.js

Issue 8684120: Fixed: Topic 11234 - toolbar icon not shown in popup windows (Closed)
Patch Set: Created Oct. 31, 2012, 9:07 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/windowObserver.js
===================================================================
--- a/lib/windowObserver.js
+++ b/lib/windowObserver.js
@@ -34,7 +34,7 @@
this.observe(window, "domwindowopened", null);
}
- Services.ww.registerNotification(this);
+ Services.obs.addObserver(this, "chrome-document-global-created", true);
this._shutdownHandler = function()
{
@@ -42,7 +42,7 @@
while (e.hasMoreElements())
this._listener.removeFromWindow(e.getNext().QueryInterface(Ci.nsIDOMWindow));
- Services.ww.unregisterNotification(this);
+ Services.obs.removeObserver(this, "chrome-document-global-created");
}.bind(this);
onShutdown.add(this._shutdownHandler);
}
@@ -64,7 +64,8 @@
observe: function(subject, topic, data)
{
- if (topic == "domwindowopened")
+ // Make sure page is not about:blank (work-around for bug 795961)
+ if (subject instanceof Ci.nsIDOMWindow && subject.location.href !== "about:blank")
{
if (this._when == "start")
{
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld