Closed Bug 718899 Opened 12 years ago Closed 12 years ago

Implement Cu.forceShrinkingGC / Cu.schedulePreciseShrinkingGC

Categories

(Core :: XPConnect, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla12

People

(Reporter: johns, Assigned: johns)

References

Details

Attachments

(1 file, 1 obsolete file)

      No description provided.
Per discussion in #jsapi
Assignee: nobody → jschoenick
Status: NEW → ASSIGNED
Attachment #589370 - Flags: review?(anygregor)
Comment on attachment 589370 [details] [diff] [review]
Implement Cu.forceShrinkingGC / Cu.schedulePreciseShrinkingGC

>@@ -3622,35 +3630,47 @@ class PreciseGCRunnable : public nsRunna
>         JSContext *cx;
>         JSContext *iter = nsnull;
>         while ((cx = JS_ContextIterator(rt, &iter)) != NULL) {
>             if (JS_IsRunning(cx)) {
>                 return NS_DispatchToMainThread(this);
>             }
>         }
> 
>-        JS_GC(mCx);
>+        if (mShrinking)
>+          JS_ShrinkingGC(mCx);
>+        else
>+          JS_GC(mCx);

Looks like the indentation should be 4 here.
Attachment #589370 - Flags: review?(anygregor) → review+
Is there any reason to make the argument to PreciseGCRunnable optional?
@Ms2ger - Not particularly, its only a helper class in this file. Changed version attached, if it looks okay to you this is checkin-needed
Attachment #589370 - Attachment is obsolete: true
Attachment #589921 - Flags: review?(Ms2ger)
Comment on attachment 589921 [details] [diff] [review]
Implement Cu.forceShrinkingGC / Cu.schedulePreciseShrinkingGC

lgtm, thanks
Attachment #589921 - Flags: review?(Ms2ger) → feedback+
https://hg.mozilla.org/mozilla-central/rev/3a322365e2d4
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Hardware: x86_64 → All
Resolution: --- → FIXED
Target Milestone: --- → mozilla12
Version: unspecified → Trunk
Added to DOM fuzzer :)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: