summaryrefslogtreecommitdiffstats
path: root/js/src/builtin/Promise.cpp
diff options
context:
space:
mode:
authorGaming4JC <g4jc@hyperbola.info>2019-06-09 00:37:55 -0400
committerGaming4JC <g4jc@hyperbola.info>2019-07-18 22:38:28 -0400
commitbd6819820961aaed4c57949341fedc57feab7403 (patch)
treeab9f917304a58671e85da23a5eebfca5536a6716 /js/src/builtin/Promise.cpp
parente1e313f3b6905c39a4b78a2e6cc918238540aeb2 (diff)
downloadUXP-bd6819820961aaed4c57949341fedc57feab7403.tar
UXP-bd6819820961aaed4c57949341fedc57feab7403.tar.gz
UXP-bd6819820961aaed4c57949341fedc57feab7403.tar.lz
UXP-bd6819820961aaed4c57949341fedc57feab7403.tar.xz
UXP-bd6819820961aaed4c57949341fedc57feab7403.zip
1320408 - Part 21: Change PromiseObject::onSettled to static method.
Diffstat (limited to 'js/src/builtin/Promise.cpp')
-rw-r--r--js/src/builtin/Promise.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/js/src/builtin/Promise.cpp b/js/src/builtin/Promise.cpp
index 4210b9cd2..ec7845e89 100644
--- a/js/src/builtin/Promise.cpp
+++ b/js/src/builtin/Promise.cpp
@@ -603,7 +603,7 @@ ResolvePromise(JSContext* cx, Handle<PromiseObject*> promise, HandleValue valueO
// Now that everything else is done, do the things the debugger needs.
// Step 7 of RejectPromise implemented in onSettled.
- promise->onSettled(cx);
+ PromiseObject::onSettled(cx, promise);
// Step 7 of FulfillPromise.
// Step 8 of RejectPromise.
@@ -2671,10 +2671,9 @@ PromiseObject::reject(JSContext* cx, Handle<PromiseObject*> promise, HandleValue
return Call(cx, funVal, UndefinedHandleValue, args, &dummy);
}
-void
-PromiseObject::onSettled(JSContext* cx)
+/* static */ void
+PromiseObject::onSettled(JSContext* cx, Handle<PromiseObject*> promise)
{
- Rooted<PromiseObject*> promise(cx, this);
RootedObject stack(cx);
if (cx->options().asyncStack() || cx->compartment()->isDebuggee()) {
if (!JS::CaptureCurrentStack(cx, &stack, JS::StackCapture(JS::AllFrames()))) {