Bug 1321133. Backout 1285373 because it broke addon-sdk page workers.
MozReview-Commit-ID: PETFYk9UfF
--- a/addon-sdk/source/lib/sdk/event/chrome.js
+++ b/addon-sdk/source/lib/sdk/event/chrome.js
@@ -52,14 +52,14 @@ function observe(topic) {
// observerChannel (since third argument is `true`). There for if it
// will be GC-ed with all it's event listeners once no other references
// will be held.
addObserver(observerChannel, topic, true);
// We need to remove any observer added once the add-on is unloaded;
// otherwise we'll get a "dead object" exception.
// See: https://bugzilla.mozilla.org/show_bug.cgi?id=1001833
- unload(() => removeObserver(observerChannel, topic), { weak: true });
+ unload(() => removeObserver(observerChannel, topic));
return observerChannel;
}
exports.observe = observe;