mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
script: Impl cloning of JSPrincipals (#32706)
* Impl cloning of JSPrincipals * bincode as workspace dependency * Update mozjs and cc
This commit is contained in:
parent
5a9dc98f07
commit
59d0f1fe1a
7 changed files with 77 additions and 15 deletions
|
@ -30,12 +30,12 @@ use js::jsapi::{
|
|||
GetPromiseUserInputEventHandlingState, HandleObject, Heap, InitConsumeStreamCallback,
|
||||
InitDispatchToEventLoop, JSContext as RawJSContext, JSGCParamKey, JSGCStatus,
|
||||
JSJitCompilerOption, JSObject, JSSecurityCallbacks, JSTracer, JS_AddExtraGCRootsTracer,
|
||||
JS_InitDestroyPrincipalsCallback, JS_RequestInterruptCallback, JS_SetGCCallback,
|
||||
JS_SetGCParameter, JS_SetGlobalJitCompilerOption, JS_SetOffthreadIonCompilationEnabled,
|
||||
JS_SetParallelParsingEnabled, JS_SetSecurityCallbacks, JobQueue, MimeType,
|
||||
PromiseRejectionHandlingState, PromiseUserInputEventHandlingState, SetDOMCallbacks,
|
||||
SetGCSliceCallback, SetJobQueue, SetPreserveWrapperCallbacks, SetProcessBuildIdOp,
|
||||
SetPromiseRejectionTrackerCallback, StreamConsumer as JSStreamConsumer,
|
||||
JS_InitDestroyPrincipalsCallback, JS_InitReadPrincipalsCallback, JS_RequestInterruptCallback,
|
||||
JS_SetGCCallback, JS_SetGCParameter, JS_SetGlobalJitCompilerOption,
|
||||
JS_SetOffthreadIonCompilationEnabled, JS_SetParallelParsingEnabled, JS_SetSecurityCallbacks,
|
||||
JobQueue, MimeType, PromiseRejectionHandlingState, PromiseUserInputEventHandlingState,
|
||||
SetDOMCallbacks, SetGCSliceCallback, SetJobQueue, SetPreserveWrapperCallbacks,
|
||||
SetProcessBuildIdOp, SetPromiseRejectionTrackerCallback, StreamConsumer as JSStreamConsumer,
|
||||
};
|
||||
use js::jsval::UndefinedValue;
|
||||
use js::panic::wrap_panic;
|
||||
|
@ -466,6 +466,7 @@ unsafe fn new_rt_and_cx_with_parent(
|
|||
JS_SetSecurityCallbacks(cx, &SECURITY_CALLBACKS);
|
||||
|
||||
JS_InitDestroyPrincipalsCallback(cx, Some(principals::destroy_servo_jsprincipal));
|
||||
JS_InitReadPrincipalsCallback(cx, Some(principals::read_jsprincipal));
|
||||
|
||||
// Needed for debug assertions about whether GC is running.
|
||||
if cfg!(debug_assertions) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue