зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1066233 - Followup: Address a forgotten review comment. (r=jorendorff)
This commit is contained in:
Родитель
ad9c2fb296
Коммит
3cf7f008c4
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче