Skip to content

Commit

Permalink
Merge branch 'hotfix/cpu'
Browse files Browse the repository at this point in the history
  • Loading branch information
jrburke committed Apr 1, 2011
2 parents 0df924b + a549fa4 commit 1455214
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 19 deletions.
2 changes: 1 addition & 1 deletion extensions/firefox-share/src/install.rdf
Expand Up @@ -6,7 +6,7 @@
<em:unpack>true</em:unpack>
<em:bootstrap>true</em:bootstrap>
<em:name>F1 by Mozilla Labs</em:name>
<em:version>0.8.1</em:version>
<em:version>0.8.2</em:version>
<em:creator>Mozilla</em:creator>
<em:contributor></em:contributor>
<em:homepageURL>http://f1.mozillamessaging.com/</em:homepageURL>
Expand Down
20 changes: 2 additions & 18 deletions extensions/firefox-share/src/modules/panel.js
Expand Up @@ -104,12 +104,12 @@ sharePanel.prototype = {
}
}, false);
this.loadListener = function (evt) {
self.attachMessageListener();
self.window.setTimeout(function () {
self.sizeToContent();
}, 0);
};
this.browser.addEventListener("load", this.loadListener, true);
Services.obs.addObserver(this, 'content-document-global-created', false);

let webProgress = this.browser.webProgress;
this.stateProgressListener = new StateProgressListener(this);
Expand All @@ -124,28 +124,12 @@ sharePanel.prototype = {
},

shutdown: function () {
Services.obs.removeObserver(this, 'content-document-global-created');
let webProgress = this.browser.webProgress;
webProgress.removeProgressListener(this.stateProgressListener);
this.stateProgressListener = null;
},

observe: function (aSubject, aTopic, aData) {
if (!aSubject.location.href) {
return;
}

// is this window a child of OUR XUL window?
let mainWindow = aSubject.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIWebNavigation)
.QueryInterface(Ci.nsIDocShellTreeItem)
.rootTreeItem.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIDOMWindow);
mainWindow = mainWindow.wrappedJSObject ? mainWindow.wrappedJSObject : mainWindow;
if (mainWindow !== this.panel.ownerDocument.defaultView) {
return;
}

attachMessageListener: function () {
// listen for messages now
let self = this;
let contentWindow = this.browser.contentWindow;
Expand Down

0 comments on commit 1455214

Please sign in to comment.