diff options
author | yvt <i@yvt.jp> | 2021-07-13 21:45:21 +0900 |
---|---|---|
committer | yvt <i@yvt.jp> | 2021-07-13 21:45:21 +0900 |
commit | 320965bfb9b606b75f9d7d812cf2615ff58e0a82 (patch) | |
tree | 93e1f51b7df0d5e0046aab680b95ca204012b137 /components/script/script_runtime.rs | |
parent | dfb4a0c844b92fc9b36192d5401b850fdeba9534 (diff) | |
download | servo-320965bfb9b606b75f9d7d812cf2615ff58e0a82.tar.gz servo-320965bfb9b606b75f9d7d812cf2615ff58e0a82.zip |
refactor(script): move `crate::dom::bindings::{utils → principals)::ServoJSPrincipal`
Diffstat (limited to 'components/script/script_runtime.rs')
-rw-r--r-- | components/script/script_runtime.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/components/script/script_runtime.rs b/components/script/script_runtime.rs index e19526be0b1..5ce21f01366 100644 --- a/components/script/script_runtime.rs +++ b/components/script/script_runtime.rs @@ -16,13 +16,14 @@ use crate::dom::bindings::conversions::private_from_object; use crate::dom::bindings::conversions::root_from_handleobject; use crate::dom::bindings::error::{throw_dom_exception, Error}; use crate::dom::bindings::inheritance::Castable; +use crate::dom::bindings::principals; use crate::dom::bindings::refcounted::{trace_refcounted_objects, LiveDOMReferences}; use crate::dom::bindings::refcounted::{Trusted, TrustedPromise}; use crate::dom::bindings::reflector::DomObject; use crate::dom::bindings::root::trace_roots; use crate::dom::bindings::settings_stack; use crate::dom::bindings::trace::{trace_traceables, JSTraceable}; -use crate::dom::bindings::utils::{self, DOM_CALLBACKS}; +use crate::dom::bindings::utils::DOM_CALLBACKS; use crate::dom::event::{Event, EventBubbles, EventCancelable, EventStatus}; use crate::dom::eventtarget::EventTarget; use crate::dom::globalscope::GlobalScope; @@ -101,7 +102,7 @@ static JOB_QUEUE_TRAPS: JobQueueTraps = JobQueueTraps { static SECURITY_CALLBACKS: JSSecurityCallbacks = JSSecurityCallbacks { // TODO: Content Security Policy <https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP> contentSecurityPolicyAllows: None, - subsumes: Some(utils::subsumes), + subsumes: Some(principals::subsumes), }; /// Common messages used to control the event loops in both the script and the worker @@ -475,7 +476,7 @@ unsafe fn new_rt_and_cx_with_parent( JS_SetSecurityCallbacks(cx, &SECURITY_CALLBACKS); - JS_InitDestroyPrincipalsCallback(cx, Some(utils::destroy_servo_jsprincipal)); + JS_InitDestroyPrincipalsCallback(cx, Some(principals::destroy_servo_jsprincipal)); // Needed for debug assertions about whether GC is running. if cfg!(debug_assertions) { |