[INFER] Mark result of 'new Function.prototype' as unknown, bug 619338.

This commit is contained in:
Brian Hackett 2011-03-13 21:04:43 -07:00
parent 4c77f186e9
commit 4750d53d19

View File

@ -3647,7 +3647,7 @@ AnalyzeScriptNew(JSContext *cx, JSScript *script)
* from 'new' calls to the function.
*/
TypeFunction *funType = script->fun->getType()->asFunction();
if (funType->unknownProperties) {
if (funType->unknownProperties || script->fun->isFunctionPrototype()) {
script->thisTypes()->addType(cx, TYPE_UNKNOWN);
} else {
TypeSet *prototypeTypes = funType->getProperty(cx, id_prototype(cx), false);