Closed Bug 769015 Opened 12 years ago Closed 12 years ago

deterministicgc() causes a leak

Categories

(Core :: JavaScript Engine, defect)

x86_64
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla20

People

(Reporter: jruderman, Assigned: billm)

Details

(Keywords: memory-leak, regression, testcase, Whiteboard: [js:inv:p1])

Attachments

(3 files)

Attached file testcase
1. Install https://www.squarefree.com/extensions/domFuzzLite3.xpi
2. Run a debug build of Firefox with XPCOM_MEM_LEAK_LOG=2
3. Load the testcase.
4. Quit Firefox.

Regression range: http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=5cdbeae14405&tochange=5b3bf49ce3cf
Attached file leak log
Whiteboard: [js:inv:p1]
It might be best to fix the crash discovered in bug 770218 before fixing this leak.
Assignee: general → wmccloskey
Attached patch fixSplinter Review
This regressed when I made a separate GC reason for shutdown CCs.
Attachment #686815 - Flags: review?(continuation)
Attachment #686815 - Flags: review?(continuation) → review+
https://hg.mozilla.org/mozilla-central/rev/257f949e15fa
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla20
Comment on attachment 686815 [details] [diff] [review]
fix

> This regressed when I made a separate GC reason for shutdown CCs.

If this were a switch rather than an "if >", the compiler could have said you were missing a case :)

>-    if (reason > gcreason::DEBUG_GC && reason != gcreason::CC_FORCED)
>+    if (reason > gcreason::DEBUG_GC &&
>+        reason != gcreason::CC_FORCED && reason != gcreason::SHUTDOWN_CC)
>+    {
>         return false;
>+    }
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: