diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:37 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:37 +0000 |
commit | a90a5cba08fdf6c0ceb95101c275108a152a3aed (patch) | |
tree | 532507288f3defd7f4dcf1af49698bcb76034855 /js/public/friend/StackLimits.h | |
parent | Adding debian version 126.0.1-1. (diff) | |
download | firefox-a90a5cba08fdf6c0ceb95101c275108a152a3aed.tar.xz firefox-a90a5cba08fdf6c0ceb95101c275108a152a3aed.zip |
Merging upstream version 127.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'js/public/friend/StackLimits.h')
-rw-r--r-- | js/public/friend/StackLimits.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/js/public/friend/StackLimits.h b/js/public/friend/StackLimits.h index b4f1e010a8..231ab3219d 100644 --- a/js/public/friend/StackLimits.h +++ b/js/public/friend/StackLimits.h @@ -199,9 +199,20 @@ MOZ_ALWAYS_INLINE bool AutoCheckRecursionLimit::checkLimitImpl( #endif } +#ifdef ENABLE_WASM_JSPI +bool IsSuspendableStackActive(JSContext* cx); +JS::NativeStackLimit GetSuspendableStackLimit(JSContext* cx); +#endif + MOZ_ALWAYS_INLINE JS::NativeStackLimit AutoCheckRecursionLimit::getStackLimitSlow(JSContext* cx) const { JS::StackKind kind = stackKindForCurrentPrincipal(cx); +#ifdef ENABLE_WASM_JSPI + if (IsSuspendableStackActive(cx)) { + MOZ_RELEASE_ASSERT(kind == JS::StackForUntrustedScript); + return GetSuspendableStackLimit(cx); + } +#endif return getStackLimitHelper(cx, kind, 0); } |