Index: src/api-natives.cc |
diff --git a/src/api-natives.cc b/src/api-natives.cc |
index d8dd1510417641197da707cf27f79e51586886d3..ea6d6bf46f886ce40a1d9e5a18bc52a0d3e1c4ca 100644 |
--- a/src/api-natives.cc |
+++ b/src/api-natives.cc |
@@ -438,7 +438,13 @@ void ApiNatives::AddNativeDataProperty(Isolate* isolate, |
Handle<JSFunction> ApiNatives::CreateApiFunction( |
Isolate* isolate, Handle<FunctionTemplateInfo> obj, |
Handle<Object> prototype, ApiInstanceType instance_type) { |
- Handle<Code> code = isolate->builtins()->HandleApiCall(); |
+ Handle<Code> code; |
+ if (obj->call_code()->IsCallHandlerInfo() && |
+ CallHandlerInfo::cast(obj->call_code())->fast_handler()->IsCode()) { |
+ code = isolate->builtins()->HandleFastApiCall(); |
+ } else { |
+ code = isolate->builtins()->HandleApiCall(); |
+ } |
Handle<Code> construct_stub = isolate->builtins()->JSConstructStubApi(); |
obj->set_instantiated(true); |