diff options
author | Kunal Mohan <kunalmohan99@gmail.com> | 2020-01-24 13:29:09 +0530 |
---|---|---|
committer | Kunal Mohan <kunalmohan99@gmail.com> | 2020-01-24 20:52:36 +0530 |
commit | 5a3e1b8e6903c825e50597a218532d417f1dfef9 (patch) | |
tree | 50770b139f2e9968f7c15de246f222936975722f /components/script/dom/testbinding.rs | |
parent | be409233fdf8d3578e0529ec150a3697788ba4c8 (diff) | |
download | servo-5a3e1b8e6903c825e50597a218532d417f1dfef9.tar.gz servo-5a3e1b8e6903c825e50597a218532d417f1dfef9.zip |
rename compartment to realm
Diffstat (limited to 'components/script/dom/testbinding.rs')
-rw-r--r-- | components/script/dom/testbinding.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/components/script/dom/testbinding.rs b/components/script/dom/testbinding.rs index 52018d73b6f..c77b7cd994d 100644 --- a/components/script/dom/testbinding.rs +++ b/components/script/dom/testbinding.rs @@ -4,7 +4,6 @@ // check-tidy: no specs after this line -use crate::compartments::InCompartment; use crate::dom::bindings::callback::ExceptionHandling; use crate::dom::bindings::codegen::Bindings::EventListenerBinding::EventListener; use crate::dom::bindings::codegen::Bindings::FunctionBinding::Function; @@ -49,6 +48,7 @@ use crate::dom::globalscope::GlobalScope; use crate::dom::promise::Promise; use crate::dom::promisenativehandler::{Callback, PromiseNativeHandler}; use crate::dom::url::URL; +use crate::realms::InRealm; use crate::script_runtime::JSContext as SafeJSContext; use crate::timers::OneshotTimerCallback; use dom_struct::dom_struct; @@ -990,7 +990,7 @@ impl TestBindingMethods for TestBinding { &self, resolve: Option<Rc<SimpleCallback>>, reject: Option<Rc<SimpleCallback>>, - comp: InCompartment, + comp: InRealm, ) -> Rc<Promise> { let global = self.global(); let handler = PromiseNativeHandler::new( @@ -998,7 +998,7 @@ impl TestBindingMethods for TestBinding { resolve.map(SimpleHandler::new), reject.map(SimpleHandler::new), ); - let p = Promise::new_in_current_compartment(&global, comp); + let p = Promise::new_in_current_realm(&global, comp); p.append_native_handler(&handler); return p; @@ -1021,8 +1021,8 @@ impl TestBindingMethods for TestBinding { } } - fn PromiseAttribute(&self, comp: InCompartment) -> Rc<Promise> { - Promise::new_in_current_compartment(&self.global(), comp) + fn PromiseAttribute(&self, comp: InRealm) -> Rc<Promise> { + Promise::new_in_current_realm(&self.global(), comp) } fn AcceptPromise(&self, _promise: &Promise) {} |