Index: src/runtime/runtime-object.cc |
diff --git a/src/runtime/runtime-object.cc b/src/runtime/runtime-object.cc |
index d00ce5276d6ae9fcce0524c278ad8a4652499c3a..997c67fb790f236d8ec1e238d7a2935e5e3bb9e3 100644 |
--- a/src/runtime/runtime-object.cc |
+++ b/src/runtime/runtime-object.cc |
@@ -1058,7 +1058,7 @@ static Object* Runtime_NewObjectHelper(Isolate* isolate, |
// If function should not have prototype, construction is not allowed. In this |
rossberg
2015/09/23 08:56:10
Update comment.
Benedikt Meurer
2015/09/23 09:38:14
Done.
|
// case generated code bailouts here, since function has no initial_map. |
- if (!function->should_have_prototype() && !function->shared()->bound()) { |
+ if (!function->IsConstructor()) { |
THROW_NEW_ERROR_RETURN_FAILURE( |
isolate, NewTypeError(MessageTemplate::kNotConstructor, constructor)); |
} |