mirror of
https://github.com/servo/servo.git
synced 2025-08-04 05:00:08 +01:00
Formating
This commit is contained in:
parent
425057c432
commit
a265a2a7e6
3 changed files with 13 additions and 4 deletions
|
@ -452,7 +452,8 @@ impl FetchResponseListener for ClassicContext {
|
||||||
&mut transform_str_to_source_text(&context.script_text) as *mut _,
|
&mut transform_str_to_source_text(&context.script_text) as *mut _,
|
||||||
Some(off_thread_compilation_callback),
|
Some(off_thread_compilation_callback),
|
||||||
Box::into_raw(context) as *mut c_void,
|
Box::into_raw(context) as *mut c_void,
|
||||||
).is_null());
|
)
|
||||||
|
.is_null());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
let load = ScriptOrigin::external(
|
let load = ScriptOrigin::external(
|
||||||
|
|
|
@ -52,7 +52,7 @@ use js::jsapi::{GetRequestedModules, SetModuleMetadataHook};
|
||||||
use js::jsapi::{Heap, JSContext, JS_ClearPendingException, SetModulePrivate};
|
use js::jsapi::{Heap, JSContext, JS_ClearPendingException, SetModulePrivate};
|
||||||
use js::jsapi::{JSAutoRealm, JSObject, JSString};
|
use js::jsapi::{JSAutoRealm, JSObject, JSString};
|
||||||
use js::jsapi::{JS_DefineProperty4, JS_IsExceptionPending, JS_NewStringCopyN, JSPROP_ENUMERATE};
|
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::jsval::{JSVal, PrivateValue, UndefinedValue};
|
||||||
use js::rust::jsapi_wrapped::{GetArrayLength, JS_GetElement};
|
use js::rust::jsapi_wrapped::{GetArrayLength, JS_GetElement};
|
||||||
use js::rust::jsapi_wrapped::{GetRequestedModuleSpecifier, JS_GetPendingException};
|
use js::rust::jsapi_wrapped::{GetRequestedModuleSpecifier, JS_GetPendingException};
|
||||||
|
|
|
@ -591,8 +591,16 @@ unsafe fn new_rt_and_cx_with_parent(
|
||||||
.unwrap_or(u32::max_value()),
|
.unwrap_or(u32::max_value()),
|
||||||
);
|
);
|
||||||
// NOTE: This is disabled above, so enabling it here will do nothing for now.
|
// 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(
|
||||||
JS_SetGCParameter(cx, JSGCParamKey::JSGC_PER_ZONE_GC_ENABLED, pref!(js.mem.gc.per_zone.enabled) as u32);
|
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) {
|
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);
|
JS_SetGCParameter(cx, JSGCParamKey::JSGC_SLICE_TIME_BUDGET_MS, val as u32);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue