mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-12 00:50:40 +00:00
Bug 887889 - Clean up ContentPrefServiceChild on xpcom-shutdown r=mak
I'm not sure why this became necessary as a result of migrating to Sqlite.jsm, but this is the only way I've found to eliminate leaks from the tab process on shutdown. These leaks occur when the child process requests something from the ContentPrefService2 but shuts down before it gets its response. MozReview-Commit-ID: 2Haks17D6Em --HG-- extra : rebase_source : 6a5d213620ae497e3d073e70a3d5da4f2bb3b702
This commit is contained in:
parent
b14f6090bc
commit
957135b686
@ -62,6 +62,13 @@ var ContentPrefServiceChild = {
|
||||
Services.cpmm.addMessageListener("ContentPrefs:HandleResult", this);
|
||||
Services.cpmm.addMessageListener("ContentPrefs:HandleError", this);
|
||||
Services.cpmm.addMessageListener("ContentPrefs:HandleCompletion", this);
|
||||
Services.obs.addObserver(this, "xpcom-shutdown");
|
||||
},
|
||||
|
||||
observe() {
|
||||
Services.obs.removeObserver(this, "xpcom-shutdown");
|
||||
delete this._observers;
|
||||
delete this._requests;
|
||||
},
|
||||
|
||||
receiveMessage(msg) {
|
||||
|
Loading…
Reference in New Issue
Block a user