aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/script_runtime.rs
diff options
context:
space:
mode:
authoryvt <i@yvt.jp>2021-07-11 23:01:21 +0900
committeryvt <i@yvt.jp>2021-07-11 23:01:21 +0900
commit40fbe6b722cc91486a088f950e1629cf9ddde830 (patch)
tree03ffebbf66e4b418e1841e2dd7c76a0ae64d2905 /components/script/script_runtime.rs
parentfd177a9199baa580d17f992af51544d4afd5f69e (diff)
downloadservo-40fbe6b722cc91486a088f950e1629cf9ddde830.tar.gz
servo-40fbe6b722cc91486a088f950e1629cf9ddde830.zip
chore(deps): update mozjs
- 798c5b6: Bring `RustJSPrincipals` back
Diffstat (limited to 'components/script/script_runtime.rs')
-rw-r--r--components/script/script_runtime.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/components/script/script_runtime.rs b/components/script/script_runtime.rs
index 151db669405..50d516280fc 100644
--- a/components/script/script_runtime.rs
+++ b/components/script/script_runtime.rs
@@ -61,7 +61,7 @@ use js::jsapi::{
JSJitCompilerOption, JS_SetOffthreadIonCompilationEnabled, JS_SetParallelParsingEnabled,
};
use js::jsapi::{JSObject, PromiseRejectionHandlingState, SetPreserveWrapperCallbacks};
-use js::jsapi::{JSSecurityCallbacks, JS_SetSecurityCallbacks};
+use js::jsapi::{JSSecurityCallbacks, JS_InitDestroyPrincipalsCallback, JS_SetSecurityCallbacks};
use js::jsapi::{SetJobQueue, SetProcessBuildIdOp, SetPromiseRejectionTrackerCallback};
use js::jsval::UndefinedValue;
use js::panic::wrap_panic;
@@ -475,6 +475,8 @@ unsafe fn new_rt_and_cx_with_parent(
JS_SetSecurityCallbacks(cx, &SECURITY_CALLBACKS);
+ JS_InitDestroyPrincipalsCallback(cx, Some(utils::destroy_servo_jsprincipal));
+
// Needed for debug assertions about whether GC is running.
if cfg!(debug_assertions) {
JS_SetGCCallback(cx, Some(debug_gc_callback), ptr::null_mut());