diff options
author | Anthony Ramine <nox@nox.paris> | 2020-03-02 11:16:46 +0100 |
---|---|---|
committer | Anthony Ramine <nox@nox.paris> | 2020-03-06 11:13:28 +0100 |
commit | 5a4f8cf93f9f674a164a0a3cfc586accef3d06f9 (patch) | |
tree | c50ce5a7663486939177dbd928acdd985aa0197c /components/script/dom/promise.rs | |
parent | 813be919269f632ba23746e4700e8a18bdd4ae07 (diff) | |
download | servo-5a4f8cf93f9f674a164a0a3cfc586accef3d06f9.tar.gz servo-5a4f8cf93f9f674a164a0a3cfc586accef3d06f9.zip |
Update SpiderMonkey
Diffstat (limited to 'components/script/dom/promise.rs')
-rw-r--r-- | components/script/dom/promise.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/components/script/dom/promise.rs b/components/script/dom/promise.rs index 37baedcc663..5e60507f8fc 100644 --- a/components/script/dom/promise.rs +++ b/components/script/dom/promise.rs @@ -91,7 +91,7 @@ impl Promise { pub fn new_in_current_realm(global: &GlobalScope, _comp: InRealm) -> Rc<Promise> { let cx = global.get_cx(); rooted!(in(*cx) let mut obj = ptr::null_mut::<JSObject>()); - Promise::create_js_promise(cx, HandleObject::null(), obj.handle_mut()); + Promise::create_js_promise(cx, obj.handle_mut()); Promise::new_with_js_promise(obj.handle(), cx) } @@ -117,7 +117,7 @@ impl Promise { } #[allow(unsafe_code)] - fn create_js_promise(cx: SafeJSContext, proto: HandleObject, mut obj: MutableHandleObject) { + fn create_js_promise(cx: SafeJSContext, mut obj: MutableHandleObject) { unsafe { let do_nothing_func = JS_NewFunction( *cx, @@ -129,7 +129,7 @@ impl Promise { assert!(!do_nothing_func.is_null()); rooted!(in(*cx) let do_nothing_obj = JS_GetFunctionObject(do_nothing_func)); assert!(!do_nothing_obj.is_null()); - obj.set(NewPromiseObject(*cx, do_nothing_obj.handle(), proto)); + obj.set(NewPromiseObject(*cx, do_nothing_obj.handle())); assert!(!obj.is_null()); } } |