Bug 880041 (part 18) - Use JSObject::{is,as} for {,Debug}ScopeObject. r=luke.

This commit is contained in:
Nicholas Nethercote
2013-06-16 22:30:58 -07:00
parent 89852d90a5
commit 929feaefc9
19 changed files with 86 additions and 107 deletions

View File

@@ -104,7 +104,7 @@ MaybeCheckEvalFreeVariables(JSContext *cx, HandleScript evalCaller, HandleObject
// scope chain.
if (pc.sc->hasDebuggerStatement()) {
RootedObject scope(cx, scopeChain);
while (scope->isScope() || scope->isDebugScope()) {
while (scope->is<ScopeObject>() || scope->is<DebugScopeObject>()) {
if (scope->is<CallObject>() && !scope->as<CallObject>().isForEval()) {
RootedScript script(cx, scope->as<CallObject>().callee().nonLazyScript());
if (script->argumentsHasVarBinding()) {