| Index: src/builtins/s390/builtins-s390.cc
|
| diff --git a/src/builtins/s390/builtins-s390.cc b/src/builtins/s390/builtins-s390.cc
|
| index d23e538b0a855a58451d2dea05e0d1cfd3e152eb..98d918550fd4073f4bc6bb25f688f72ac3b403f0 100644
|
| --- a/src/builtins/s390/builtins-s390.cc
|
| +++ b/src/builtins/s390/builtins-s390.cc
|
| @@ -585,8 +585,12 @@ 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(r2, &dont_throw);
|
| + Label do_throw, dont_throw;
|
| + __ JumpIfSmi(r2, &do_throw);
|
| + STATIC_ASSERT(LAST_JS_RECEIVER_TYPE == LAST_TYPE);
|
| + __ CompareObjectType(r2, r5, r5, FIRST_JS_RECEIVER_TYPE);
|
| + __ bge(&dont_throw);
|
| + __ bind(&do_throw);
|
| {
|
| FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL);
|
| __ CallRuntime(Runtime::kThrowDerivedConstructorReturnedNonObject);
|
|
|