Closed
Bug 709162
Opened 14 years ago
Closed 11 years ago
Add crash test for cycle collector dumping
Categories
(Core :: XPCOM, defect)
Core
XPCOM
Tracking
()
RESOLVED
DUPLICATE
of bug 973090
mozilla11
People
(Reporter: mccr8, Assigned: mccr8)
References
Details
Attachments
(1 file, 1 obsolete file)
|
2.84 KB,
patch
|
bholley
:
review+
|
Details | Diff | Splinter Review |
This frequently gets broken (for the latest, see bug 709160), so we should add a very basic test that loads a simple page, does a CC dump, exits, then deletes the dump.
| Assignee | ||
Comment 1•14 years ago
|
||
This patch adds a test that calls the cycle collector with a listener that does nothing, to see if it crashes.
I confirmed that on trunk it crashes, and with the patch for bug 709160 it passes.
Right now this is a chrome mochitest because that's all I know how to do, but maybe it should be a crashtest? Bobby, is there some officially sanctioned way to write a crashtest that can use chrome privileges? I think I need those to manually invoke the cycle collector like I do.
Assignee: nobody → continuation
Attachment #580782 -
Flags: feedback?(bobbyholley+bmo)
Comment 2•14 years ago
|
||
Comment on attachment 580782 [details] [diff] [review]
call cycle collector with listener that does nothing to test CC dumping
>+ ok(true, "Didn't run cycle collector without crashing.");
Nit: I'm not really a fan of these types of messages, since they're confusing to read when they pass (or when just reading the source). In this case it's particularly silly, because this message will never be printed in the context where it makes sense (since we'd crash first). So I'd prefer "Should be able to run CC without crashing" or somesuch. But that's not why you asked me for feedback. ;-)
> Bobby, is there some officially sanctioned way to write a crashtest that can use chrome privileges?
Judging from bug 448676, I'd say not. Realistically we need to hook SpecialPowers up to the reftest harness, but I don't know how much of a priority that is. In the mean time, I think this is fine.
Attachment #580782 -
Flags: feedback?(bobbyholley+bmo) → feedback+
| Assignee | ||
Comment 3•14 years ago
|
||
Thanks for the feedback. I'll change the comment like you suggested.
| Assignee | ||
Comment 4•14 years ago
|
||
Another test for you to look at.
Attachment #580782 -
Attachment is obsolete: true
Attachment #581685 -
Flags: review?(bobbyholley+bmo)
| Assignee | ||
Comment 5•14 years ago
|
||
(basically identical to before, except I fixed up the message)
Comment 6•14 years ago
|
||
Comment on attachment 581685 [details] [diff] [review]
test that we can call the CC with a listener without crashing
>+ <a href="https://bugzilla.mozilla.org/show_bug.cgi?id="
>+ target="_blank">Mozilla Bug 709162</a>
Looks like a broken link, no?
>+ let Cu = Components.utils;
>+ let Ci = Components.interfaces;
>+
>+ var emptyListener = {
>+ QueryInterface: function QueryInterface(aIID) {
>+ if (aIID.equals(Components.interfaces.nsICycleCollectorListener) ||
>+ aIID.equals(Components.interfaces.nsISupports))
If you're going to do the Cu/Ci/Cc/Cr paradigm, you might as well be consistent and use them.
Looks fine in general. r=bholley
Attachment #581685 -
Flags: review?(bobbyholley+bmo) → review+
| Assignee | ||
Comment 7•14 years ago
|
||
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla11
| Assignee | ||
Comment 8•13 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/e517d4c43143
Backed out because it caused an infinite loop with single threading of JS. Calling JS while on the CC thread is a bad idea, apparently. I'll rewrite the empty listener in C++ I guess.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
| Assignee | ||
Comment 9•11 years ago
|
||
jld is adding a test in bug 973090.
Status: REOPENED → RESOLVED
Closed: 14 years ago → 11 years ago
Resolution: --- → DUPLICATE
Comment 10•11 years ago
|
||
(In reply to Andrew McCreight [:mccr8] from comment #9)
> jld is adding a test in bug 973090.
>
> *** This bug has been marked as a duplicate of bug 973090 ***
Not that it matters much, but this test which already exists might also qualify:
https://mxr.mozilla.org/mozilla-central/source/toolkit/components/aboutmemory/tests/test_aboutmemory6.xul
You need to log in
before you can comment on or make changes to this bug.
Description
•