OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |