mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Add preserveWrapperCallback (fixes #7218)
This commit is contained in:
parent
b4b3cedc10
commit
ca31b2d749
1 changed files with 3 additions and 0 deletions
|
@ -55,6 +55,7 @@ use js::jsapi::{DisableIncrementalGC, JS_AddExtraGCRootsTracer, JS_SetWrapObject
|
||||||
use js::jsapi::{GCDescription, GCProgress, JSGCInvocationKind, SetGCSliceCallback};
|
use js::jsapi::{GCDescription, GCProgress, JSGCInvocationKind, SetGCSliceCallback};
|
||||||
use js::jsapi::{JSAutoRequest, JSGCStatus, JS_GetRuntime, JS_SetGCCallback, SetDOMCallbacks};
|
use js::jsapi::{JSAutoRequest, JSGCStatus, JS_GetRuntime, JS_SetGCCallback, SetDOMCallbacks};
|
||||||
use js::jsapi::{JSContext, JSRuntime, JSTracer};
|
use js::jsapi::{JSContext, JSRuntime, JSTracer};
|
||||||
|
use js::jsapi::{JSObject, SetPreserveWrapperCallback};
|
||||||
use js::jsval::UndefinedValue;
|
use js::jsval::UndefinedValue;
|
||||||
use js::rust::Runtime;
|
use js::rust::Runtime;
|
||||||
use layout_interface::{ReflowQueryType};
|
use layout_interface::{ReflowQueryType};
|
||||||
|
@ -654,8 +655,10 @@ impl ScriptTask {
|
||||||
}
|
}
|
||||||
|
|
||||||
unsafe {
|
unsafe {
|
||||||
|
unsafe extern "C" fn empty_wrapper_callback(_: *mut JSContext, _: *mut JSObject) -> u8 { 1 }
|
||||||
SetDOMProxyInformation(ptr::null(), 0, Some(shadow_check_callback));
|
SetDOMProxyInformation(ptr::null(), 0, Some(shadow_check_callback));
|
||||||
SetDOMCallbacks(runtime.rt(), &DOM_CALLBACKS);
|
SetDOMCallbacks(runtime.rt(), &DOM_CALLBACKS);
|
||||||
|
SetPreserveWrapperCallback(runtime.rt(), Some(empty_wrapper_callback));
|
||||||
// Pre barriers aren't working correctly at the moment
|
// Pre barriers aren't working correctly at the moment
|
||||||
DisableIncrementalGC(runtime.rt());
|
DisableIncrementalGC(runtime.rt());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue