| Index: src/runtime/runtime-object.cc
|
| diff --git a/src/runtime/runtime-object.cc b/src/runtime/runtime-object.cc
|
| index b128190fb546a1c1b1a03d4ed9e6167c691ad11d..d00ce5276d6ae9fcce0524c278ad8a4652499c3a 100644
|
| --- a/src/runtime/runtime-object.cc
|
| +++ b/src/runtime/runtime-object.cc
|
| @@ -1056,8 +1056,9 @@
|
| Handle<JSFunction>::cast(original_constructor);
|
|
|
|
|
| - // Check that function is a constructor.
|
| - if (!function->IsConstructor()) {
|
| + // If function should not have prototype, construction is not allowed. In this
|
| + // case generated code bailouts here, since function has no initial_map.
|
| + if (!function->should_have_prototype() && !function->shared()->bound()) {
|
| THROW_NEW_ERROR_RETURN_FAILURE(
|
| isolate, NewTypeError(MessageTemplate::kNotConstructor, constructor));
|
| }
|
|
|