Last Comment Bug 718899 - Implement Cu.forceShrinkingGC / Cu.schedulePreciseShrinkingGC
: Implement Cu.forceShrinkingGC / Cu.schedulePreciseShrinkingGC
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: XPConnect (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla12
Assigned To: John Schoenick [:johns]
:
Mentors:
Depends on:
Blocks: 704646
  Show dependency treegraph
 
Reported: 2012-01-17 17:24 PST by John Schoenick [:johns]
Modified: 2012-01-28 19:11 PST (History)
9 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Implement Cu.forceShrinkingGC / Cu.schedulePreciseShrinkingGC (4.95 KB, patch)
2012-01-17 17:28 PST, John Schoenick [:johns]
anygregor: review+
Details | Diff | Splinter Review
Implement Cu.forceShrinkingGC / Cu.schedulePreciseShrinkingGC (4.98 KB, patch)
2012-01-19 11:18 PST, John Schoenick [:johns]
Ms2ger: feedback+
Details | Diff | Splinter Review

Description John Schoenick [:johns] 2012-01-17 17:24:39 PST

    
Comment 1 John Schoenick [:johns] 2012-01-17 17:28:20 PST
Created attachment 589370 [details] [diff] [review]
Implement Cu.forceShrinkingGC / Cu.schedulePreciseShrinkingGC

Per discussion in #jsapi
Comment 2 Gregor Wagner [:gwagner] 2012-01-17 21:21:14 PST
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.
Comment 3 :Ms2ger 2012-01-18 01:50:08 PST
Is there any reason to make the argument to PreciseGCRunnable optional?
Comment 4 John Schoenick [:johns] 2012-01-19 11:18:07 PST
Created attachment 589921 [details] [diff] [review]
Implement Cu.forceShrinkingGC / Cu.schedulePreciseShrinkingGC

@Ms2ger - Not particularly, its only a helper class in this file. Changed version attached, if it looks okay to you this is checkin-needed
Comment 5 :Ms2ger 2012-01-19 11:20:33 PST
Comment on attachment 589921 [details] [diff] [review]
Implement Cu.forceShrinkingGC / Cu.schedulePreciseShrinkingGC

lgtm, thanks
Comment 6 Andrew McCreight [:mccr8] 2012-01-19 13:18:07 PST
https://hg.mozilla.org/integration/mozilla-inbound/rev/3a322365e2d4
Comment 7 Andrew McCreight [:mccr8] 2012-01-20 19:52:43 PST
https://hg.mozilla.org/mozilla-central/rev/3a322365e2d4
Comment 8 Jesse Ruderman 2012-01-28 19:11:48 PST
Added to DOM fuzzer :)

Note You need to log in before you can comment on or make changes to this bug.