Closed Bug 753101 Opened 12 years ago Closed 12 years ago

Re-enable gc-zeal in the shell

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla15

People

(Reporter: terrence, Assigned: terrence)

Details

Attachments

(1 file)

It appears to have gotten accidentally disabled in Bug 742570.
Assignee: general → terrence
Attached patch v0Splinter Review
This works for me locally.
Attachment #622191 - Flags: review?(wmccloskey)
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.
Attachment #622191 - Flags: review?(wmccloskey) → review+
https://hg.mozilla.org/mozilla-central/rev/a254a5886fc6
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla15
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: