diff options
author | Moonchild <moonchild@palemoon.org> | 2019-12-17 21:47:18 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-17 21:47:18 +0000 |
commit | 07d0bcbf112a4e274905837c6ea0b0212b51e4e3 (patch) | |
tree | 3b43cb63b33d82d4965d402aca39028836983bb4 /js/src/jsexn.cpp | |
parent | e2de507e0261c9b138cd3cf5356c21eca3e7a28d (diff) | |
parent | 6c3e42ac6427fabaf83b5acc7877aa3d15117125 (diff) | |
download | UXP-07d0bcbf112a4e274905837c6ea0b0212b51e4e3.tar UXP-07d0bcbf112a4e274905837c6ea0b0212b51e4e3.tar.gz UXP-07d0bcbf112a4e274905837c6ea0b0212b51e4e3.tar.lz UXP-07d0bcbf112a4e274905837c6ea0b0212b51e4e3.tar.xz UXP-07d0bcbf112a4e274905837c6ea0b0212b51e4e3.zip |
Merge pull request #1327 from g4jc/async_iteration
Implement Async Iteration in SpiderMonkey
This resolves #1287
Diffstat (limited to 'js/src/jsexn.cpp')
-rw-r--r-- | js/src/jsexn.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/js/src/jsexn.cpp b/js/src/jsexn.cpp index 3fc9200c1..72f03ea55 100644 --- a/js/src/jsexn.cpp +++ b/js/src/jsexn.cpp @@ -32,6 +32,7 @@ #include "vm/ErrorObject.h" #include "vm/GlobalObject.h" #include "vm/SavedStacks.h" +#include "vm/SelfHosting.h" #include "vm/StringBuffer.h" #include "jsobjinlines.h" @@ -1091,3 +1092,19 @@ js::ValueToSourceForError(JSContext* cx, HandleValue val, JSAutoByteString& byte return "<<error converting value to string>>"; return bytes.encodeLatin1(cx, str); } + +bool +js::GetInternalError(JSContext* cx, unsigned errorNumber, MutableHandleValue error) +{ + FixedInvokeArgs<1> args(cx); + args[0].set(Int32Value(errorNumber)); + return CallSelfHostedFunction(cx, "GetInternalError", NullHandleValue, args, error); +} + +bool +js::GetTypeError(JSContext* cx, unsigned errorNumber, MutableHandleValue error) +{ + FixedInvokeArgs<1> args(cx); + args[0].set(Int32Value(errorNumber)); + return CallSelfHostedFunction(cx, "GetTypeError", NullHandleValue, args, error); +} |