Closed
Bug 545487
Opened 15 years ago
Closed 15 years ago
Cleanup TabTracker_observe
Categories
(Firefox :: Sync, defect)
Firefox
Sync
Tracking
()
RESOLVED
FIXED
1.1
People
(Reporter: zpao, Assigned: zpao)
Details
Attachments
(1 file)
1.25 KB,
patch
|
Mardak
:
review+
|
Details | Diff | Splinter Review |
* Should remove the event listener (not necessary but good form)
* Don't need to QI windows
Comment 1•15 years ago
|
||
(In reply to comment #0)
> * Should remove the event listener (not necessary but good form)
Are you talking about when the tracker is ending? There isn't an existing code structure to tell various things to unload, and related.. things kinda assume they stay around until the app is quitting.
And just to be clear, you're referring to the window watcher registerNotification?
Assignee | ||
Comment 2•15 years ago
|
||
(In reply to comment #1)
> (In reply to comment #0)
> > * Should remove the event listener (not necessary but good form)
> Are you talking about when the tracker is ending? There isn't an existing code
> structure to tell various things to unload, and related.. things kinda assume
> they stay around until the app is quitting.
No, I mean right after the listener for "load" is called.
> And just to be clear, you're referring to the window watcher
> registerNotification?
Yes.
Assignee | ||
Comment 3•15 years ago
|
||
Attachment #426383 -
Flags: review?(edilee)
Comment 4•15 years ago
|
||
Comment on attachment 426383 [details] [diff] [review]
Patch v0.1
> observe: function TabTracker_observe(aSubject, aTopic, aData) {
..
>+ aSubject.addEventListener("load", function(event) {
>+ event.currentTarget.removeEventListener("load", arguments.callee, false);
You can just name the function and do something like..
aSubject.removeEventListener("load", onLoad, false);
Attachment #426383 -
Flags: review?(edilee) → review+
Assignee | ||
Comment 5•15 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.1
Updated•6 years ago
|
Component: Firefox Sync: Backend → Sync
Product: Cloud Services → Firefox
You need to log in
before you can comment on or make changes to this bug.
Description
•