Index: src/factory.cc |
diff --git a/src/factory.cc b/src/factory.cc |
index 2a80953eb146ce973f0f894cbb468d476d3ee3d4..a406350c7da7f4c8fb9dfdd25ac66c1892be2d40 100644 |
--- a/src/factory.cc |
+++ b/src/factory.cc |
@@ -766,6 +766,8 @@ Handle<JSObject> Factory::NewArgumentsObject(Handle<Object> callee, |
Handle<JSFunction> Factory::CreateApiFunction( |
Handle<FunctionTemplateInfo> obj, ApiInstanceType instance_type) { |
Handle<Code> code = Handle<Code>(Builtins::builtin(Builtins::HandleApiCall)); |
+ Handle<Code> construct_stub = |
+ Handle<Code>(Builtins::builtin(Builtins::JSConstructStubApi)); |
int internal_field_count = 0; |
if (!obj->instance_template()->IsUndefined()) { |
@@ -840,6 +842,7 @@ Handle<JSFunction> Factory::CreateApiFunction( |
} |
result->shared()->set_function_data(*obj); |
+ result->shared()->set_construct_stub(*construct_stub); |
result->shared()->DontAdaptArguments(); |
// Recursively copy parent templates' accessors, 'data' may be modified. |