From cba3f6142704ce228aaf54b5c98c6ef5b3f871be Mon Sep 17 00:00:00 2001 From: Gaming4JC Date: Fri, 13 Dec 2019 20:55:05 -0500 Subject: Bug 1343481 - Part 6: Add native functions wrapper for GetInternalError and GetTypeError. Tag #1287 --- js/src/builtin/Promise.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'js/src/builtin') diff --git a/js/src/builtin/Promise.cpp b/js/src/builtin/Promise.cpp index 021f6021f..8fd39e7bb 100644 --- a/js/src/builtin/Promise.cpp +++ b/js/src/builtin/Promise.cpp @@ -11,11 +11,11 @@ #include "mozilla/TimeStamp.h" #include "jscntxt.h" +#include "jsexn.h" #include "gc/Heap.h" #include "js/Debug.h" #include "vm/AsyncFunction.h" -#include "vm/SelfHosting.h" #include "jsobjinlines.h" @@ -783,9 +783,7 @@ RejectMaybeWrappedPromise(JSContext *cx, HandleObject promiseObj, HandleValue re // interpreter frame active right now. If a thenable job with a // throwing `then` function got us here, that'll not be the case, // so we add one by throwing the error from self-hosted code. - FixedInvokeArgs<1> getErrorArgs(cx); - getErrorArgs[0].set(Int32Value(JSMSG_PROMISE_ERROR_IN_WRAPPED_REJECTION_REASON)); - if (!CallSelfHostedFunction(cx, "GetInternalError", reason, getErrorArgs, &reason)) + if (!GetInternalError(cx, JSMSG_PROMISE_ERROR_IN_WRAPPED_REJECTION_REASON, &reason)) return false; } } -- cgit v1.2.3