diff --git a/mozilla/js/src/xpconnect/src/xpcjsruntime.cpp b/mozilla/js/src/xpconnect/src/xpcjsruntime.cpp index c083b5169f7..b413bf96a76 100644 --- a/mozilla/js/src/xpconnect/src/xpcjsruntime.cpp +++ b/mozilla/js/src/xpconnect/src/xpcjsruntime.cpp @@ -238,11 +238,13 @@ ContextCallback(JSContext *cx, uintN operation) { if (operation == JSCONTEXT_NEW) { + // Set the limits on the native and script stack space. XPCPerThreadData* tls = XPCPerThreadData::GetData(cx); if(tls) { JS_SetThreadStackLimit(cx, tls->GetStackLimit()); } + JS_SetScriptStackQuota(cx, 100*1024*1024); } }