Closed
Bug 852499
Opened 12 years ago
Closed 12 years ago
Port Bug 835730 (Properly tear down components when the profile is being shut down) to SeaMonkey
Categories
(SeaMonkey :: Startup & Profiles, defect)
SeaMonkey
Startup & Profiles
Tracking
(Not tracked)
RESOLVED
FIXED
seamonkey2.20
People
(Reporter: philip.chee, Assigned: philip.chee)
Details
Attachments
(1 file, 1 obsolete file)
9.90 KB,
patch
|
neil
:
review+
|
Details | Diff | Splinter Review |
From Bug 835730:
> nsBrowserGlue.js currently listens to xpcom-shutdown for part of its
> cleanup, this should be done instead after a profile-before-change event,
> additionally the places shutdown code does not respond properly to profile-
> before-change events causing problems in some unit tests (see bug 820438).
> The patch removes the xpcom-shutdown hook and responds to profile-before-
> change instead and it also resolves the problem with places shutdown seen
> in bug 820438.
![]() |
Assignee | |
Comment 1•12 years ago
|
||
Also implements Bug 836789 (Use weak references when adding observers in nsBrowserGlue.js). I hope I did it correctly.
Attachment #727690 -
Flags: feedback?(neil)
![]() |
Assignee | |
Comment 2•12 years ago
|
||
Comment on attachment 727690 [details] [diff] [review]
Patch v1.0 Port changes from Firefox.
I've had it baking for some time and I haven't noticed any problems. changing f? to r?
Attachment #727690 -
Flags: feedback?(neil) → review?
![]() |
Assignee | |
Updated•12 years ago
|
Attachment #727690 -
Flags: review? → review?(neil)
Comment 3•12 years ago
|
||
Comment on attachment 727690 [details] [diff] [review]
Patch v1.0 Port changes from Firefox.
> _onProfileShutdown: function()
> {
>- this._shutdownPlaces();
>- if (!Sanitizer.doPendingSanitize())
>- Services.prefs.setBoolPref("privacy.sanitize.didShutdownSanitize", true);
>+ // observer removal
>+ if (this._isIdleObserver)
>+ this._idleService.removeIdleObserver(this, BOOKMARKS_BACKUP_IDLE_TIME);
>+ this._isIdleObserver = false;
This is part of places, so should be part of shutdownPlaces... oh wait, it is. Or did you mean to move rather than copy?
>+
>+ UserAgentOverrides.uninit
();
>+ _onPlacesShutdown: function() {
>+ if (!Sanitizer.doPendingSanitize())
>+ Services.prefs.setBoolPref("privacy.sanitize.didShutdownSanitize", true);
Previously sanitise happened after places shutdownPlaces...
![]() |
Assignee | |
Comment 4•12 years ago
|
||
>> _onProfileShutdown: function()
>> {
>>- this._shutdownPlaces();
>>- if (!Sanitizer.doPendingSanitize())
>>- Services.prefs.setBoolPref("privacy.sanitize.didShutdownSanitize", true);
>>+ // observer removal
>>+ if (this._isIdleObserver)
>>+ this._idleService.removeIdleObserver(this, BOOKMARKS_BACKUP_IDLE_TIME);
>>+ this._isIdleObserver = false;
> This is part of places, so should be part of shutdownPlaces... oh wait, it is. Or did you mean to move rather than copy?
Yes, it should be moved instead of copied.
>>+
>>+ UserAgentOverrides.uninit
> ();
Fixed.
>>+ _onPlacesShutdown: function() {
>>+ if (!Sanitizer.doPendingSanitize())
>>+ Services.prefs.setBoolPref("privacy.sanitize.didShutdownSanitize", true);
> Previously sanitise happened after places shutdownPlaces..
Fixed. Although Firefox puts the call to the sanitizer at the begining of _onPlacesShutdown().
Attachment #727690 -
Attachment is obsolete: true
Attachment #727690 -
Flags: review?(neil)
Attachment #741871 -
Flags: review?(neil)
Updated•12 years ago
|
Attachment #741871 -
Flags: review?(neil) → review+
![]() |
Assignee | |
Comment 5•12 years ago
|
||
Pushed to comm-central:
http://hg.mozilla.org/comm-central/rev/eddffcc75444
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → seamonkey2.20
![]() |
Assignee | |
Updated•12 years ago
|
Attachment #741871 -
Attachment description: Patch v1.1 fix review issues. → Patch v1.1 fix review issues. [check-in comment 5]
You need to log in
before you can comment on or make changes to this bug.
Description
•