Index: src/wasm/wasm-js.cc |
diff --git a/src/wasm/wasm-js.cc b/src/wasm/wasm-js.cc |
index c6f72f67d16486d823c9c9128d512586b386fa22..182ea0f6b9f68f0b112b4bfcd13db578baf1533e 100644 |
--- a/src/wasm/wasm-js.cc |
+++ b/src/wasm/wasm-js.cc |
@@ -566,8 +566,9 @@ void WebAssemblyMemoryGetBuffer( |
static i::Handle<i::FunctionTemplateInfo> NewTemplate(i::Isolate* i_isolate, |
FunctionCallback func) { |
Isolate* isolate = reinterpret_cast<Isolate*>(i_isolate); |
- Local<FunctionTemplate> local = FunctionTemplate::New(isolate, func); |
- return v8::Utils::OpenHandle(*local); |
+ Local<FunctionTemplate> templ = FunctionTemplate::New(isolate, func); |
+ templ->ReadOnlyPrototype(); |
+ return v8::Utils::OpenHandle(*templ); |
} |
namespace internal { |