Index: gin/function_template.h |
diff --git a/gin/function_template.h b/gin/function_template.h |
index c0228cb5f83f2a24f8f806dab381c82340fe5455..69ce797c721166a12e0e214aa1d8c6cf1c84cec4 100644 |
--- a/gin/function_template.h |
+++ b/gin/function_template.h |
@@ -237,11 +237,12 @@ v8::Local<v8::FunctionTemplate> CreateFunctionTemplate( |
typedef internal::CallbackHolder<Sig> HolderT; |
HolderT* holder = new HolderT(isolate, callback, callback_flags); |
- return v8::FunctionTemplate::New( |
- isolate, |
- &internal::Dispatcher<Sig>::DispatchToCallback, |
- ConvertToV8<v8::Local<v8::External> >(isolate, |
- holder->GetHandle(isolate))); |
+ v8::Local<v8::FunctionTemplate> tmpl = v8::FunctionTemplate::New( |
+ isolate, &internal::Dispatcher<Sig>::DispatchToCallback, |
+ ConvertToV8<v8::Local<v8::External>>(isolate, |
+ holder->GetHandle(isolate))); |
+ tmpl->RemovePrototype(); |
+ return tmpl; |
} |
// CreateFunctionHandler installs a CallAsFunction handler on the given |