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:
Chris Double 2015-03-12 19:06:07 +13:00
parent 7b6e314df1
commit 2af19b2675
5 changed files with 13 additions and 13 deletions

View file

@ -913,7 +913,7 @@ pub fn from_untrusted_node_address(runtime: *mut JSRuntime, candidate: Untrusted
if object.is_null() {
panic!("Attempted to create a `JS<Node>` from an invalid pointer!")
}
let boxed_node: *const Node = conversions::unwrap(object);
let boxed_node: *const Node = conversions::native_from_reflector(object);
Temporary::from_unrooted(Unrooted::from_raw(boxed_node))
}
}