Commit cd929344 authored by binji's avatar binji Committed by Commit bot

[d8 Workers] Make Worker prototype read-only

BUG=chromium:518747
R=mstarzinger@chromium.org
LOG=n

Review URL: https://codereview.chromium.org/1277543006

Cr-Commit-Position: refs/heads/master@{#30099}
parent f2acba0e
......@@ -1144,6 +1144,7 @@ Local<ObjectTemplate> Shell::CreateGlobalTemplate(Isolate* isolate) {
worker_fun_template->SetClassName(
String::NewFromUtf8(isolate, "Worker", NewStringType::kNormal)
.ToLocalChecked());
worker_fun_template->ReadOnlyPrototype();
worker_fun_template->PrototypeTemplate()->Set(
String::NewFromUtf8(isolate, "terminate", NewStringType::kNormal)
.ToLocalChecked(),
......
// Copyright 2015 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
if (this.Worker) {
Worker.prototype = 12;
var __v_6 = new Worker('');
__v_6.postMessage([]);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment