diff options
author | Gaming4JC <g4jc@hyperbola.info> | 2019-06-09 00:19:45 -0400 |
---|---|---|
committer | Gaming4JC <g4jc@hyperbola.info> | 2019-07-18 22:38:27 -0400 |
commit | e1e313f3b6905c39a4b78a2e6cc918238540aeb2 (patch) | |
tree | 726f7cbde8c28de59abddfcbbf47744a126c0db1 /js/src/wasm/WasmJS.cpp | |
parent | 31c0c2f9cc71f8ff1d8c183d38449693ec7ca502 (diff) | |
download | UXP-e1e313f3b6905c39a4b78a2e6cc918238540aeb2.tar UXP-e1e313f3b6905c39a4b78a2e6cc918238540aeb2.tar.gz UXP-e1e313f3b6905c39a4b78a2e6cc918238540aeb2.tar.lz UXP-e1e313f3b6905c39a4b78a2e6cc918238540aeb2.tar.xz UXP-e1e313f3b6905c39a4b78a2e6cc918238540aeb2.zip |
1320408 - Part 20: Change PromiseObject::resolve and PromiseObject::reject to static method.
Diffstat (limited to 'js/src/wasm/WasmJS.cpp')
-rw-r--r-- | js/src/wasm/WasmJS.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/js/src/wasm/WasmJS.cpp b/js/src/wasm/WasmJS.cpp index 3fbc81ac5..8d4f575b2 100644 --- a/js/src/wasm/WasmJS.cpp +++ b/js/src/wasm/WasmJS.cpp @@ -1659,7 +1659,7 @@ Reject(JSContext* cx, const CompileArgs& args, UniqueChars error, Handle<Promise if (!cx->getPendingException(&rejectionValue)) return false; - return promise->reject(cx, rejectionValue); + return PromiseObject::reject(cx, promise, rejectionValue); } RootedObject stack(cx, promise->allocationSite()); @@ -1687,7 +1687,7 @@ Reject(JSContext* cx, const CompileArgs& args, UniqueChars error, Handle<Promise return false; RootedValue rejectionValue(cx, ObjectValue(*errorObj)); - return promise->reject(cx, rejectionValue); + return PromiseObject::reject(cx, promise, rejectionValue); } static bool @@ -1699,7 +1699,7 @@ ResolveCompilation(JSContext* cx, Module& module, Handle<PromiseObject*> promise return false; RootedValue resolutionValue(cx, ObjectValue(*moduleObj)); - return promise->resolve(cx, resolutionValue); + return PromiseObject::resolve(cx, promise, resolutionValue); } struct CompileTask : PromiseTask @@ -1734,7 +1734,7 @@ RejectWithPendingException(JSContext* cx, Handle<PromiseObject*> promise) if (!GetAndClearException(cx, &rejectionValue)) return false; - return promise->reject(cx, rejectionValue); + return PromiseObject::reject(cx, promise, rejectionValue); } static bool @@ -1822,7 +1822,7 @@ ResolveInstantiation(JSContext* cx, Module& module, HandleObject importObj, return false; val = ObjectValue(*resultObj); - return promise->resolve(cx, val); + return PromiseObject::resolve(cx, promise, val); } struct InstantiateTask : CompileTask @@ -1894,7 +1894,7 @@ WebAssembly_instantiate(JSContext* cx, unsigned argc, Value* vp) return RejectWithPendingException(cx, promise, callArgs); RootedValue resolutionValue(cx, ObjectValue(*instanceObj)); - if (!promise->resolve(cx, resolutionValue)) + if (!PromiseObject::resolve(cx, promise, resolutionValue)) return false; } else { auto task = cx->make_unique<InstantiateTask>(cx, promise, importObj); |