mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1053999 - Switch chrome stack check to use StackForSystemCode, r=bholley
--HG-- extra : rebase_source : 89fe8ac209cec4e626c6c92fa6cee35c8addc395
This commit is contained in:
parent
ba8413b907
commit
9c3b7ca95a
@ -402,7 +402,7 @@ JSCompartment::wrap(JSContext *cx, MutableHandleObject obj, HandleObject existin
|
||||
|
||||
// Invoke the prewrap callback. We're a bit worried about infinite
|
||||
// recursion here, so we do a check - see bug 809295.
|
||||
JS_CHECK_CHROME_RECURSION(cx, return false);
|
||||
JS_CHECK_SYSTEM_RECURSION(cx, return false);
|
||||
if (cb->preWrap) {
|
||||
obj.set(cb->preWrap(cx, global, obj, objectPassedToWrap));
|
||||
if (!obj)
|
||||
|
@ -1041,8 +1041,8 @@ GetNativeStackLimit(JSContext *cx, int extraAllowance = 0)
|
||||
} \
|
||||
JS_END_MACRO
|
||||
|
||||
#define JS_CHECK_CHROME_RECURSION(cx, onerror) \
|
||||
JS_CHECK_RECURSION_LIMIT(cx, js::GetNativeStackLimit(cx, 1024 * int(sizeof(size_t))), onerror)
|
||||
#define JS_CHECK_SYSTEM_RECURSION(cx, onerror) \
|
||||
JS_CHECK_RECURSION_LIMIT(cx, js::GetNativeStackLimit(cx, js::StackForSystemCode), onerror)
|
||||
|
||||
#define JS_CHECK_RECURSION_CONSERVATIVE(cx, onerror) \
|
||||
JS_CHECK_RECURSION_LIMIT(cx, js::GetNativeStackLimit(cx, js::StackForUntrustedScript, -1024 * int(sizeof(size_t))), onerror)
|
||||
|
Loading…
Reference in New Issue
Block a user