| Index: src/builtins/arm64/builtins-arm64.cc
|
| diff --git a/src/builtins/arm64/builtins-arm64.cc b/src/builtins/arm64/builtins-arm64.cc
|
| index 0612ae2ce96c0f6b4eaa71eb91b28a264c8c95a0..1f0b4f7185ba67c6db7f30026993a955fac57677 100644
|
| --- a/src/builtins/arm64/builtins-arm64.cc
|
| +++ b/src/builtins/arm64/builtins-arm64.cc
|
| @@ -598,8 +598,11 @@ void Generate_JSConstructStubHelper(MacroAssembler* masm, bool is_api_function,
|
| // Check that the result is not a Smi, indicating that the constructor result
|
| // from a derived class is neither undefined nor an Object.
|
| if (check_derived_construct) {
|
| - Label dont_throw;
|
| - __ JumpIfNotSmi(x0, &dont_throw);
|
| + Label do_throw, dont_throw;
|
| + __ JumpIfSmi(x0, &do_throw);
|
| + STATIC_ASSERT(LAST_JS_RECEIVER_TYPE == LAST_TYPE);
|
| + __ JumpIfObjectType(x0, x3, x3, FIRST_JS_RECEIVER_TYPE, &dont_throw, ge);
|
| + __ Bind(&do_throw);
|
| {
|
| FrameScope scope(masm, StackFrame::INTERNAL);
|
| __ CallRuntime(Runtime::kThrowDerivedConstructorReturnedNonObject);
|
|
|