diff options
author | sagudev <samo.golez@outlook.com> | 2021-03-12 18:30:13 +0100 |
---|---|---|
committer | sagudev <samo.golez@outlook.com> | 2021-03-12 18:30:13 +0100 |
commit | a265a2a7e6c53eda558aa61712646382bbe129af (patch) | |
tree | fd23bbffc476d7c3b71a7a5e61449760a254dbfe | |
parent | 425057c4323fe9bf3857e2c99912dc10b79166b7 (diff) | |
download | servo-a265a2a7e6c53eda558aa61712646382bbe129af.tar.gz servo-a265a2a7e6c53eda558aa61712646382bbe129af.zip |
Formating
-rw-r--r-- | components/script/dom/htmlscriptelement.rs | 3 | ||||
-rw-r--r-- | components/script/script_module.rs | 2 | ||||
-rw-r--r-- | components/script/script_runtime.rs | 12 |
3 files changed, 13 insertions, 4 deletions
diff --git a/components/script/dom/htmlscriptelement.rs b/components/script/dom/htmlscriptelement.rs index aedb2b719c3..d27fee98fb5 100644 --- a/components/script/dom/htmlscriptelement.rs +++ b/components/script/dom/htmlscriptelement.rs @@ -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( diff --git a/components/script/script_module.rs b/components/script/script_module.rs index e41a8df31f3..9f2f2a2e506 100644 --- a/components/script/script_module.rs +++ b/components/script/script_module.rs @@ -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}; diff --git a/components/script/script_runtime.rs b/components/script/script_runtime.rs index ca57b157083..c44b4b04676 100644 --- a/components/script/script_runtime.rs +++ b/components/script/script_runtime.rs @@ -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); } |