Bug 877995 - IndexedDB should set a stack quotum when creating a JS runtime; r=khuey

This commit is contained in:
Eddy Bruel 2013-05-31 13:29:54 -07:00
parent 0f0f2c2c3f
commit 7e175536ac

View File

@ -522,6 +522,12 @@ class ThreadLocalJSRuntime
mRuntime = JS_NewRuntime(sRuntimeHeapSize, JS_NO_HELPER_THREADS);
NS_ENSURE_TRUE(mRuntime, NS_ERROR_OUT_OF_MEMORY);
/*
* Not setting this will cause JS_CHECK_RECURSION to report false
* positives
*/
JS_SetNativeStackQuota(mRuntime, 128 * sizeof(size_t) * 1024);
mContext = JS_NewContext(mRuntime, 0);
NS_ENSURE_TRUE(mContext, NS_ERROR_OUT_OF_MEMORY);