mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Remove Reflectable::global
This commit is contained in:
parent
e7a1149984
commit
907781eb75
8 changed files with 15 additions and 22 deletions
|
@ -5,7 +5,7 @@
|
|||
//! The `Reflector` struct.
|
||||
|
||||
use dom::bindings::conversions::DerivedFrom;
|
||||
use dom::bindings::global::{GlobalRoot, global_root_from_object, global_scope_from_reflector};
|
||||
use dom::bindings::global::global_scope_from_reflector;
|
||||
use dom::bindings::js::Root;
|
||||
use dom::globalscope::GlobalScope;
|
||||
use js::jsapi::{HandleObject, JSContext, JSObject};
|
||||
|
@ -84,11 +84,6 @@ pub trait Reflectable {
|
|||
fn global_scope(&self) -> Root<GlobalScope> where Self: Sized {
|
||||
global_scope_from_reflector(self)
|
||||
}
|
||||
|
||||
/// Returns the global object of the realm that the Reflectable was created in.
|
||||
fn global(&self) -> GlobalRoot where Self: Sized {
|
||||
unsafe { global_root_from_object(*self.reflector().get_jsobject()) }
|
||||
}
|
||||
}
|
||||
|
||||
/// A trait to initialize the `Reflector` for a DOM object.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue