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

Side by Side Diff: src/d8.cc

Issue 1277543006: [d8 Workers] Make Worker prototype read-only (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: add test Created 5 years, 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-518747.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 5
6 // Defined when linking against shared lib on Windows. 6 // Defined when linking against shared lib on Windows.
7 #if defined(USING_V8_SHARED) && !defined(V8_SHARED) 7 #if defined(USING_V8_SHARED) && !defined(V8_SHARED)
8 #define V8_SHARED 8 #define V8_SHARED
9 #endif 9 #endif
10 10
(...skipping 1126 matching lines...) Expand 10 before | Expand all | Expand 10 after
1137 .ToLocalChecked(), 1137 .ToLocalChecked(),
1138 performance_template); 1138 performance_template);
1139 1139
1140 Local<FunctionTemplate> worker_fun_template = 1140 Local<FunctionTemplate> worker_fun_template =
1141 FunctionTemplate::New(isolate, WorkerNew); 1141 FunctionTemplate::New(isolate, WorkerNew);
1142 Local<Signature> worker_signature = 1142 Local<Signature> worker_signature =
1143 Signature::New(isolate, worker_fun_template); 1143 Signature::New(isolate, worker_fun_template);
1144 worker_fun_template->SetClassName( 1144 worker_fun_template->SetClassName(
1145 String::NewFromUtf8(isolate, "Worker", NewStringType::kNormal) 1145 String::NewFromUtf8(isolate, "Worker", NewStringType::kNormal)
1146 .ToLocalChecked()); 1146 .ToLocalChecked());
1147 worker_fun_template->ReadOnlyPrototype();
1147 worker_fun_template->PrototypeTemplate()->Set( 1148 worker_fun_template->PrototypeTemplate()->Set(
1148 String::NewFromUtf8(isolate, "terminate", NewStringType::kNormal) 1149 String::NewFromUtf8(isolate, "terminate", NewStringType::kNormal)
1149 .ToLocalChecked(), 1150 .ToLocalChecked(),
1150 FunctionTemplate::New(isolate, WorkerTerminate, Local<Value>(), 1151 FunctionTemplate::New(isolate, WorkerTerminate, Local<Value>(),
1151 worker_signature)); 1152 worker_signature));
1152 worker_fun_template->PrototypeTemplate()->Set( 1153 worker_fun_template->PrototypeTemplate()->Set(
1153 String::NewFromUtf8(isolate, "postMessage", NewStringType::kNormal) 1154 String::NewFromUtf8(isolate, "postMessage", NewStringType::kNormal)
1154 .ToLocalChecked(), 1155 .ToLocalChecked(),
1155 FunctionTemplate::New(isolate, WorkerPostMessage, Local<Value>(), 1156 FunctionTemplate::New(isolate, WorkerPostMessage, Local<Value>(),
1156 worker_signature)); 1157 worker_signature));
(...skipping 1312 matching lines...) Expand 10 before | Expand all | Expand 10 after
2469 } 2470 }
2470 2471
2471 } // namespace v8 2472 } // namespace v8
2472 2473
2473 2474
2474 #ifndef GOOGLE3 2475 #ifndef GOOGLE3
2475 int main(int argc, char* argv[]) { 2476 int main(int argc, char* argv[]) {
2476 return v8::Shell::Main(argc, argv); 2477 return v8::Shell::Main(argc, argv);
2477 } 2478 }
2478 #endif 2479 #endif
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-518747.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698