Closed Bug 415495 Opened 17 years ago Closed 17 years ago

not removing controllers calls JS on scope without Components

Categories

(Calendar :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: dbaron, Assigned: dbaron)

Details

Attachments

(1 file)

Attached patch patch (deleted) — Splinter Review
When starting and exiting Sunbird on a clean profile, I see two occurrences of the assertion "XPConnect is being called on a scope without a 'Components' property". This bug is about the first of those assertions; bug 413296 already covers the second. This assertion happens because we execute JS code in the controller implementation late during nsGlobalWindow's cleanup (in ClearControllers). This is, it appears, after we've cleaned up all the properties in the window -- after JS should be executing in that window. This patch fixes the assertion by removing the controllers (like many other users of the same API do). It patches both Lightning and Sunbird, but I've tested it only on Sunbird, and only on the trunk. (I still need to figure out who should review this; suggestions welcome.)
Attachment #301197 - Flags: review?
Note that the calendar.js patch also fixes some bad indentation in the code surrounding where I patched; there were two functions using 3-space indentation instead of 4-space indentation.
David, I think Philipp <philipp@bugzilla.kewis.ch> would be a suitable reviewer for your patch.
Comment on attachment 301197 [details] [diff] [review] patch Hello David, thanks a lot for taking a deeper look at our leaks! The patch looks good, I never realized it was necessary to remove command controllers. When checkin in, please remember we have a cross-commit policy. I tested on lightning and sunbird branch and it seems to work.
Attachment #301197 - Flags: review? → review+
Reminder: This patch waits for checkin.
Assignee: nobody → dbaron
Status: NEW → ASSIGNED
I can check it in tomorrow.
Keywords: checkin-needed
Checked in to trunk and MOZILLA_1_8_BRANCH, 2008-02-09 11:13 -0800.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
OS: Linux → All
Hardware: PC → All
Target Milestone: --- → 0.8
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: