mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-05 16:22:53 +00:00
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:
parent
3b8ae4eb13
commit
98889870b9
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user