diff options
author | Josh Matthews <josh@joshmatthews.net> | 2016-09-22 15:58:37 -0400 |
---|---|---|
committer | Josh Matthews <josh@joshmatthews.net> | 2016-09-22 16:21:23 -0400 |
commit | e9c0606454ed50ef7f8aa0858aa211a146aebfcb (patch) | |
tree | f52522fdce8d90e9e60a5a48744551f41c5b63a1 /components/script/dom/testbinding.rs | |
parent | 54d2060eae2c07d7d888a4a90c4bfe0c34382ed1 (diff) | |
download | servo-e9c0606454ed50ef7f8aa0858aa211a146aebfcb.tar.gz servo-e9c0606454ed50ef7f8aa0858aa211a146aebfcb.zip |
Remove maybe_ prefix from Promise methods.
Diffstat (limited to 'components/script/dom/testbinding.rs')
-rw-r--r-- | components/script/dom/testbinding.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/components/script/dom/testbinding.rs b/components/script/dom/testbinding.rs index ad80cc58cc9..6f7d7baf770 100644 --- a/components/script/dom/testbinding.rs +++ b/components/script/dom/testbinding.rs @@ -664,15 +664,15 @@ impl TestBindingMethods for TestBinding { } fn PromiseResolveNative(&self, cx: *mut JSContext, p: &Promise, v: HandleValue) { - p.maybe_resolve(cx, v); + p.resolve(cx, v); } fn PromiseRejectNative(&self, cx: *mut JSContext, p: &Promise, v: HandleValue) { - p.maybe_reject(cx, v); + p.reject(cx, v); } fn PromiseRejectWithTypeError(&self, p: &Promise, s: USVString) { - p.maybe_reject_error(self.global().r().get_cx(), Error::Type(s.0)); + p.reject_error(self.global().r().get_cx(), Error::Type(s.0)); } #[allow(unrooted_must_root)] @@ -692,8 +692,8 @@ impl TestBindingMethods for TestBinding { reject: Option<Rc<SimpleCallback>>) -> Rc<Promise> { let global = self.global(); let handler = PromiseNativeHandler::new(global.r(), - resolve.map(|r| SimpleHandler::new(r)), - reject.map(|r| SimpleHandler::new(r))); + resolve.map(SimpleHandler::new), + reject.map(SimpleHandler::new)); let p = Promise::new(global.r()); p.append_native_handler(&handler); return p; @@ -788,6 +788,6 @@ impl TestBindingCallback { let p = self.promise.root(); let cx = p.global().r().get_cx(); let _ac = JSAutoCompartment::new(cx, p.reflector().get_jsobject().get()); - p.maybe_resolve_native(cx, &self.value); + p.resolve_native(cx, &self.value); } } |