| Index: src/crankshaft/arm/lithium-arm.cc
|
| diff --git a/src/crankshaft/arm/lithium-arm.cc b/src/crankshaft/arm/lithium-arm.cc
|
| index dce3c6b5d54bd48c214bd8d2ccf640991fcd2c78..456ef6b04d0e4dcee399f66e923c789e55cf9220 100644
|
| --- a/src/crankshaft/arm/lithium-arm.cc
|
| +++ b/src/crankshaft/arm/lithium-arm.cc
|
| @@ -877,10 +877,12 @@ void LChunkBuilder::AddInstruction(LInstruction* instr,
|
| DCHECK_NOT_NULL(hydrogen_env);
|
| if (instr->IsSyntacticTailCall()) {
|
| // If it was a syntactic tail call we need to drop the current frame and
|
| - // an arguments adaptor frame on top of it (if the latter is present).
|
| + // all the frames on top of it that are either an arguments adaptor frame
|
| + // or a tail caller frame.
|
| hydrogen_env = hydrogen_env->outer();
|
| - if (hydrogen_env != nullptr &&
|
| - hydrogen_env->frame_type() == ARGUMENTS_ADAPTOR) {
|
| + while (hydrogen_env != nullptr &&
|
| + (hydrogen_env->frame_type() == ARGUMENTS_ADAPTOR ||
|
| + hydrogen_env->frame_type() == TAIL_CALLER_FUNCTION)) {
|
| hydrogen_env = hydrogen_env->outer();
|
| }
|
| if (hydrogen_env != nullptr) {
|
|
|