Bug 1391042 - Don't load Sync UI for hidden windows. r?Gijs
MozReview-Commit-ID: FUhegHkOoiV
--- a/browser/base/content/browser-sync.js
+++ b/browser/base/content/browser-sync.js
@@ -85,17 +85,18 @@ var gSync = {
// we open the window. We can avoid a repaint.
if (state.status != UIState.STATUS_NOT_CONFIGURED) {
this.updateAllUI(state);
}
}
},
init() {
- if (this._initialized) {
+ // Bail out if we're already initialized or for hidden windows.
+ if (this._initialized || window.location.href != getBrowserURL()) {
return;
}
for (let topic of this._obs) {
Services.obs.addObserver(this, topic, true);
}
this._generateNodeGetters();