Last Comment Bug 753101 - Re-enable gc-zeal in the shell
: Re-enable gc-zeal in the shell
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla15
Assigned To: Terrence Cole [:terrence]
:
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-08 13:59 PDT by Terrence Cole [:terrence]
Modified: 2012-05-09 03:46 PDT (History)
1 user (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
v0 (3.68 KB, patch)
2012-05-08 16:17 PDT, Terrence Cole [:terrence]
wmccloskey: review+
Details | Diff | Splinter Review

Description Terrence Cole [:terrence] 2012-05-08 13:59:20 PDT
It appears to have gotten accidentally disabled in Bug 742570.
Comment 1 Terrence Cole [:terrence] 2012-05-08 16:17:38 PDT
Created attachment 622191 [details] [diff] [review]
v0

This works for me locally.
Comment 2 Bill McCloskey (:billm) 2012-05-08 16:24:01 PDT
Comment on attachment 622191 [details] [diff] [review]
v0

Review of attachment 622191 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks.

::: js/src/jsapi.cpp
@@ +6591,2 @@
>          zeal = atoi(env);
> +        frequency = !!p ? atoi(p + 1) : 100;

No need for the !!p; it can be just p. And instead of 100 please use JS_DEFAULT_ZEAL_FREQ.

::: js/src/shell/js.cpp
@@ +5008,5 @@
>          return 1;
>  
>      JS_SetGCParameter(rt, JSGC_MODE, JSGC_MODE_INCREMENTAL);
>      JS_SetGCParameterForThread(cx, JSGC_MAX_CODE_CACHE_BYTES, 16 * 1024 * 1024);
> +    JS_SetGCZeal(cx, 0, 0);

You need to put #ifdef JS_GC_ZEAL around this or else it won't compile.
Comment 3 Terrence Cole [:terrence] 2012-05-08 17:39:48 PDT
https://hg.mozilla.org/integration/mozilla-inbound/rev/a254a5886fc6
Comment 4 Ed Morley [:emorley] 2012-05-09 03:46:53 PDT
https://hg.mozilla.org/mozilla-central/rev/a254a5886fc6

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