Bug 1066233 - Followup: Address a forgotten review comment. (r=jorendorff)

This commit is contained in:
Eric Faust 2015-03-11 00:49:38 -07:00
Родитель ad9c2fb296
Коммит 3cf7f008c4
1 изменённых файлов: 4 добавлений и 7 удалений

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

@ -7008,7 +7008,6 @@ EmitClass(ExclusiveContext *cx, BytecodeEmitter *bce, ParseNode *pn)
if (Emit1(cx, bce, JSOP_POP) < 0)
return false;
bool shouldPopResult = false;
if (names) {
// That DEFCONST is never gonna be used, but use it here for logical consistency.
ParseNode *innerName = names->innerBinding();
@ -7022,15 +7021,13 @@ EmitClass(ExclusiveContext *cx, BytecodeEmitter *bce, ParseNode *pn)
if (outerName) {
if (!EmitLexicalInitialization(cx, bce, outerName, JSOP_DEFVAR))
return false;
shouldPopResult = true;
// Only class statements make outer bindings, and they do not leave
// themselves on the stack.
if (Emit1(cx, bce, JSOP_POP) < 0)
return false;
}
}
if (shouldPopResult) {
if (Emit1(cx, bce, JSOP_POP) < 0)
return false;
}
MOZ_ALWAYS_TRUE(bce->sc->setLocalStrictMode(savedStrictness));
return true;