Index: src/api-natives.cc |
diff --git a/src/api-natives.cc b/src/api-natives.cc |
index ea6d6bf46f886ce40a1d9e5a18bc52a0d3e1c4ca..2dd0fed0edd536ea77d989abc0d5e7d734a63dee 100644 |
--- a/src/api-natives.cc |
+++ b/src/api-natives.cc |
@@ -445,7 +445,9 @@ Handle<JSFunction> ApiNatives::CreateApiFunction( |
} else { |
code = isolate->builtins()->HandleApiCall(); |
} |
- Handle<Code> construct_stub = isolate->builtins()->JSConstructStubApi(); |
+ Handle<Code> construct_stub = |
+ prototype.is_null() ? isolate->builtins()->ConstructedNonConstructable() |
+ : isolate->builtins()->JSConstructStubApi(); |
obj->set_instantiated(true); |
Handle<JSFunction> result; |