Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(171)

Unified Diff: src/wasm/wasm-js.cc

Issue 2620783005: Make .prototype properties of Wasm constructors read-only (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/mjsunit/wasm/js-api.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 {
« no previous file with comments | « no previous file | test/mjsunit/wasm/js-api.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698