[INFER] Allow for scripts with no reachable return statement when analyzing 'new' script properties, bug 657197.

This commit is contained in:
Brian Hackett 2011-05-15 22:58:53 -07:00
parent 98223df216
commit 2eed6ef8b1
2 changed files with 6 additions and 2 deletions

View File

@ -0,0 +1,5 @@
try { (function() {
new function() {
throw [];
}
})() } catch (e) {}

View File

@ -4066,8 +4066,7 @@ AnalyzeNewScriptProperties(JSContext *cx, TypeObject *type, JSScript *script, JS
}
}
/* Should have hit a STOP or similar. */
JS_NOT_REACHED("bad");
/* Will have hit a STOP or similar, unless the script always throws. */
return true;
}