mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Fix #2108 by renaming unwrap functions to native_from_reflector
As noted by @bholley. "unwrap" is confusing because we are both stripping off wrappers *and* getting a native from a reflector. Changing the "unwrap" usage to "native_from_reflector" for clarity. This renames 'unwrap' to 'native_from_reflector' and 'unwrap_jsmanaged' to 'native_from_reflector_jsmanaged'.
This commit is contained in:
parent
7b6e314df1
commit
2af19b2675
5 changed files with 13 additions and 13 deletions
|
@ -6,7 +6,7 @@
|
|||
|
||||
use dom::bindings::codegen::PrototypeList;
|
||||
use dom::bindings::codegen::PrototypeList::MAX_PROTO_CHAIN_LENGTH;
|
||||
use dom::bindings::conversions::{unwrap_jsmanaged, is_dom_class};
|
||||
use dom::bindings::conversions::{native_from_reflector_jsmanaged, is_dom_class};
|
||||
use dom::bindings::error::throw_type_error;
|
||||
use dom::bindings::global::GlobalRef;
|
||||
use dom::bindings::js::{Temporary, Root};
|
||||
|
@ -576,7 +576,7 @@ pub extern fn outerize_global(_cx: *mut JSContext, obj: JSHandleObject) -> *mut
|
|||
unsafe {
|
||||
debug!("outerizing");
|
||||
let obj = *obj.unnamed_field1;
|
||||
let win: Root<window::Window> = unwrap_jsmanaged(obj).unwrap().root();
|
||||
let win: Root<window::Window> = native_from_reflector_jsmanaged(obj).unwrap().root();
|
||||
win.r().browser_context().as_ref().unwrap().window_proxy()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue