Bug 880041 (part 13) - Use JSObject::{is,as} for CallObject. r=evilpies.

This commit is contained in:
Nicholas Nethercote
2013-06-16 18:46:36 -07:00
parent e6b465147b
commit 12cb5fa3de
22 changed files with 88 additions and 84 deletions

View File

@@ -108,8 +108,8 @@ MaybeCheckEvalFreeVariables(JSContext *cx, HandleScript evalCaller, HandleObject
if (pc.sc->hasDebuggerStatement()) {
RootedObject scope(cx, scopeChain);
while (scope->isScope() || scope->isDebugScope()) {
if (scope->isCall() && !scope->asCall().isForEval()) {
RootedScript script(cx, scope->asCall().callee().nonLazyScript());
if (scope->is<CallObject>() && !scope->as<CallObject>().isForEval()) {
RootedScript script(cx, scope->as<CallObject>().callee().nonLazyScript());
if (script->argumentsHasVarBinding()) {
if (!JSScript::argumentsOptimizationFailed(cx, script))
return false;