Bug 1053999 - Switch chrome stack check to use StackForSystemCode, r=bholley

--HG--
extra : rebase_source : 89fe8ac209cec4e626c6c92fa6cee35c8addc395
This commit is contained in:
Steve Fink 2014-11-13 12:23:17 -08:00
parent ba8413b907
commit 9c3b7ca95a
2 changed files with 3 additions and 3 deletions

View File

@ -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)

View File

@ -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)