mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Add global default method for Reflectable trait
This commit is contained in:
parent
2703568227
commit
ce6075825d
17 changed files with 88 additions and 83 deletions
|
@ -12,7 +12,7 @@ use dom::bindings::codegen::Bindings::FunctionBinding::Function;
|
|||
use dom::bindings::codegen::Bindings::WindowBinding::{ScrollBehavior, ScrollToOptions};
|
||||
use dom::bindings::codegen::Bindings::WindowBinding::{self, FrameRequestCallback, WindowMethods};
|
||||
use dom::bindings::error::{Error, Fallible, report_pending_exception};
|
||||
use dom::bindings::global::{GlobalRef, global_root_from_reflector};
|
||||
use dom::bindings::global::GlobalRef;
|
||||
use dom::bindings::inheritance::Castable;
|
||||
use dom::bindings::js::RootedReference;
|
||||
use dom::bindings::js::{JS, MutNullableHeap, Root};
|
||||
|
@ -803,7 +803,7 @@ impl<'a, T: Reflectable> ScriptHelpers for &'a T {
|
|||
#[allow(unsafe_code)]
|
||||
fn evaluate_script_on_global_with_result(self, code: &str, filename: &str,
|
||||
rval: MutableHandleValue) {
|
||||
let global = global_root_from_reflector(self);
|
||||
let global = self.global();
|
||||
let cx = global.r().get_cx();
|
||||
let _ar = JSAutoRequest::new(cx);
|
||||
let globalhandle = global.r().reflector().get_jsobject();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue