Remove the proto_{id,depth} arguments from unwrap_jsmanaged.

Instead, we infer them from the type we're unwrapping into. This will prevent
any mismatches between the type we return and the type we check for.
This commit is contained in:
Ms2ger 2014-12-20 13:46:16 +01:00
parent e1dae2f59b
commit b8c2573f4d
3 changed files with 8 additions and 17 deletions

View file

@ -350,9 +350,7 @@ impl<T: Reflectable+IDLInterface> FromJSValConvertible<()> for JS<T> {
if !value.is_object() {
return Err(());
}
unwrap_jsmanaged(value.to_object(),
IDLInterface::get_prototype_id(None::<T>),
IDLInterface::get_prototype_depth(None::<T>))
unwrap_jsmanaged(value.to_object())
}
}