Make Error::to_jsval take a &GlobalScope

This commit is contained in:
Anthony Ramine 2016-10-01 21:39:09 +02:00
parent e036579ea0
commit ac5c4c2194
2 changed files with 4 additions and 4 deletions

View file

@ -167,7 +167,7 @@ impl Promise {
pub fn reject_error(&self, cx: *mut JSContext, error: Error) {
rooted!(in(cx) let mut v = UndefinedValue());
unsafe {
error.to_jsval(cx, self.global().r(), v.handle_mut());
error.to_jsval(cx, &self.global_scope(), v.handle_mut());
}
self.reject(cx, v.handle());
}