Closed Bug 545487 Opened 15 years ago Closed 15 years ago

Cleanup TabTracker_observe

Categories

(Firefox :: Sync, defect)

defect
Not set
minor

Tracking

()

RESOLVED FIXED

People

(Reporter: zpao, Assigned: zpao)

Details

Attachments

(1 file)

* Should remove the event listener (not necessary but good form) * Don't need to QI windows
(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?
(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.
Attached patch Patch v0.1Splinter Review
Attachment #426383 - Flags: review?(edilee)
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+
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.1
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.

Attachment

General

Created:
Updated:
Size: