summaryrefslogtreecommitdiffstats
path: root/js/src/builtin
diff options
context:
space:
mode:
authorGaming4JC <g4jc@hyperbola.info>2019-12-14 09:57:20 -0500
committerGaming4JC <g4jc@hyperbola.info>2019-12-17 06:25:29 -0500
commit63eee6325ea72fae191b50ea2a23c46758c063e6 (patch)
treed08454e3bdb28a7a3e034c78af9521c916d1ecb8 /js/src/builtin
parent55728c964fa20391d31b31562033a2a63f1da40d (diff)
downloadUXP-63eee6325ea72fae191b50ea2a23c46758c063e6.tar
UXP-63eee6325ea72fae191b50ea2a23c46758c063e6.tar.gz
UXP-63eee6325ea72fae191b50ea2a23c46758c063e6.tar.lz
UXP-63eee6325ea72fae191b50ea2a23c46758c063e6.tar.xz
UXP-63eee6325ea72fae191b50ea2a23c46758c063e6.zip
Bug 1355399 - Switch property retrieval in Async-from-Sync Iterator prototype methods.
Tag #1287
Diffstat (limited to 'js/src/builtin')
-rw-r--r--js/src/builtin/Promise.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/js/src/builtin/Promise.cpp b/js/src/builtin/Promise.cpp
index d2b7b543b..6bb2d61d7 100644
--- a/js/src/builtin/Promise.cpp
+++ b/js/src/builtin/Promise.cpp
@@ -2444,16 +2444,16 @@ js::AsyncFromSyncIteratorMethod(JSContext* cx, CallArgs& args, CompletionKind co
// For 6.1.3.2.2 and 6.1.3.2.3, steps 7-16 corresponds to steps 11-20.
// Steps 7-8.
- RootedValue value(cx);
- if (!GetProperty(cx, resultObj, resultObj, cx->names().value, &value))
- return AbruptRejectPromise(cx, args, resultPromise, nullptr);
-
- // Steps 9-10.
RootedValue doneVal(cx);
if (!GetProperty(cx, resultObj, resultObj, cx->names().done, &doneVal))
return AbruptRejectPromise(cx, args, resultPromise, nullptr);
bool done = ToBoolean(doneVal);
+ // Steps 9-10.
+ RootedValue value(cx);
+ if (!GetProperty(cx, resultObj, resultObj, cx->names().value, &value))
+ return AbruptRejectPromise(cx, args, resultPromise, nullptr);
+
// Step 11.
Rooted<PromiseObject*> promise(cx, CreatePromiseObjectWithoutResolutionFunctions(cx));
if (!promise)