[INFER] Block recursion in AnalyzeNewScriptProperties, bug 657624.

This commit is contained in:
Brian Hackett 2011-05-18 09:21:13 -07:00
parent e10c9c51e3
commit 534fc1b409

View File

@ -3880,6 +3880,14 @@ AnalyzeNewScriptProperties(JSContext *cx, TypeObject *type, JSScript *script, JS
* have been cleared).
*/
if (initializerList->length() > 50) {
/*
* Bail out on really long initializer lists (far longer than maximum
* number of properties we can track), we may be recursing.
*/
return false;
}
ScriptAnalysis *analysis = script->analysis(cx);
if (analysis && !analysis->ranInference())
analysis->analyzeTypes(cx);