mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-06 07:48:38 +09:00
Bug 1343481 - Part 6: Add native functions wrapper for GetInternalError and GetTypeError.
Tag #1287
This commit is contained in:
parent
04ec8aaf1c
commit
2bbebc6ebc
3 changed files with 24 additions and 4 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue