Closed Bug 732308 Opened 14 years ago Closed 14 years ago

xpcshell/head.js leaks component manager in some cases

Categories

(Testing :: XPCShell Harness, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla13

People

(Reporter: luke, Assigned: luke)

References

Details

Attachments

(1 file)

Attached patch fixSplinter Review
A side-effect of bug 730497 is to make do_get_profile (testing/xpcshell/head.js:907) a "heavyweight" function. This causes the component manager's refcount to not go all the way down to 0 in all the services/sync xpcshell tests. However, this is nothing special about bug 730497, to see this on trunk, just put an "eval('')" at the head of do_get_profile and run 'make xpcshell-tests'. (You could also just run any individual sync test, say, test_Observers.js, but bug 732255 won't pass the -d flag to xpcshell which is what turns on the assert-crash.) The actual problem seems to be some unnatural interaction between the lifetime of the component manager and xpcshell. Nulling out the unnecessary vars in the newly-entrained scope fixes the problem.
Attachment #602246 - Flags: review?(ted.mielczarek)
Blocks: 730497
Comment on attachment 602246 [details] [diff] [review] fix Changing r?jmaher at ted's suggestions.
Attachment #602246 - Flags: review?(ted.mielczarek) → review?(jmaher)
Comment on attachment 602246 [details] [diff] [review] fix Review of attachment 602246 [details] [diff] [review]: ----------------------------------------------------------------- these changes look good
Attachment #602246 - Flags: review?(jmaher) → review+
Assignee: nobody → luke
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
For posterity, from irc, running the command: python -u ../config/pythonpath.py -I../build ../testing/xpcshell/runxpcshelltests.py --build-info=./mozinfo.json dist/bin/xpcshell _tests/xpcshell/js/xpconnect/tests/unit --test-path=test_bug604362.js does not pass -d (the test doesn't want it), but 'make xpcshell-tests' passes -d for this test.
Oops, wrong bug, ignore that.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: