Formating

This commit is contained in:
sagudev 2021-03-12 18:30:13 +01:00
parent 425057c432
commit a265a2a7e6
3 changed files with 13 additions and 4 deletions

View file

@ -452,7 +452,8 @@ impl FetchResponseListener for ClassicContext {
&mut transform_str_to_source_text(&context.script_text) as *mut _,
Some(off_thread_compilation_callback),
Box::into_raw(context) as *mut c_void,
).is_null());
)
.is_null());
}
} else {
let load = ScriptOrigin::external(

View file

@ -52,7 +52,7 @@ use js::jsapi::{GetRequestedModules, SetModuleMetadataHook};
use js::jsapi::{Heap, JSContext, JS_ClearPendingException, SetModulePrivate};
use js::jsapi::{JSAutoRealm, JSObject, JSString};
use js::jsapi::{JS_DefineProperty4, JS_IsExceptionPending, JS_NewStringCopyN, JSPROP_ENUMERATE};
use js::jsapi::{ThrowOnModuleEvaluationFailure, ModuleInstantiate};
use js::jsapi::{ModuleInstantiate, ThrowOnModuleEvaluationFailure};
use js::jsval::{JSVal, PrivateValue, UndefinedValue};
use js::rust::jsapi_wrapped::{GetArrayLength, JS_GetElement};
use js::rust::jsapi_wrapped::{GetRequestedModuleSpecifier, JS_GetPendingException};

View file

@ -591,8 +591,16 @@ unsafe fn new_rt_and_cx_with_parent(
.unwrap_or(u32::max_value()),
);
// NOTE: This is disabled above, so enabling it here will do nothing for now.
JS_SetGCParameter(cx, JSGCParamKey::JSGC_INCREMENTAL_GC_ENABLED, pref!(js.mem.gc.incremental.enabled) as u32);
JS_SetGCParameter(cx, JSGCParamKey::JSGC_PER_ZONE_GC_ENABLED, pref!(js.mem.gc.per_zone.enabled) as u32);
JS_SetGCParameter(
cx,
JSGCParamKey::JSGC_INCREMENTAL_GC_ENABLED,
pref!(js.mem.gc.incremental.enabled) as u32,
);
JS_SetGCParameter(
cx,
JSGCParamKey::JSGC_PER_ZONE_GC_ENABLED,
pref!(js.mem.gc.per_zone.enabled) as u32,
);
if let Some(val) = in_range(pref!(js.mem.gc.incremental.slice_ms), 0, 100_000) {
JS_SetGCParameter(cx, JSGCParamKey::JSGC_SLICE_TIME_BUDGET_MS, val as u32);
}