Bug 625199 - Actually that NULL check was necessary in js_GetPropertyHelperInline (having a non-null pc does not mean currentScript is non-null because currentScript returns null when cx->fp is in another compartment (r=bustage) CLOSED TREE

--HG--
extra : rebase_source : f35ede2c9fba57aa09775cf80e8ce064d1f90394
This commit is contained in:
Luke Wagner 2012-08-23 18:42:29 -07:00
Родитель 3b8ae4eb13
Коммит 98889870b9
1 изменённых файлов: 8 добавлений и 5 удалений

Просмотреть файл

@ -4562,11 +4562,14 @@ js_GetPropertyHelperInline(JSContext *cx, HandleObject obj, HandleObject receive
return false;
}
if (!cx->hasStrictOption() ||
cx->stack.currentScript()->warnedAboutUndefinedProp ||
(op != JSOP_GETPROP && op != JSOP_GETELEM)) {
return JS_TRUE;
}
/* Don't warn if not strict or for random getprop operations. */
if (!cx->hasStrictOption() || (op != JSOP_GETPROP && op != JSOP_GETELEM))
return true;
/* Don't warn repeatedly for the same script. */
JSScript *script = cx->stack.currentScript();
if (!script || script->warnedAboutUndefinedProp)
return true;
/*
* XXX do not warn about missing __iterator__ as the function