| 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 1193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1204 .ToLocalChecked(), | 1204 .ToLocalChecked(), |
| 1205 FunctionTemplate::New(isolate, WorkerGetMessage, Local<Value>(), | 1205 FunctionTemplate::New(isolate, WorkerGetMessage, Local<Value>(), |
| 1206 worker_signature)); | 1206 worker_signature)); |
| 1207 worker_fun_template->InstanceTemplate()->SetInternalFieldCount(1); | 1207 worker_fun_template->InstanceTemplate()->SetInternalFieldCount(1); |
| 1208 global_template->Set( | 1208 global_template->Set( |
| 1209 String::NewFromUtf8(isolate, "Worker", NewStringType::kNormal) | 1209 String::NewFromUtf8(isolate, "Worker", NewStringType::kNormal) |
| 1210 .ToLocalChecked(), | 1210 .ToLocalChecked(), |
| 1211 worker_fun_template); | 1211 worker_fun_template); |
| 1212 #endif // !V8_SHARED | 1212 #endif // !V8_SHARED |
| 1213 | 1213 |
| 1214 Local<ObjectTemplate> os_templ = ObjectTemplate::New(isolate); | |
| 1215 AddOSMethods(isolate, os_templ); | |
| 1216 global_template->Set( | |
| 1217 String::NewFromUtf8(isolate, "os", NewStringType::kNormal) | |
| 1218 .ToLocalChecked(), | |
| 1219 os_templ); | |
| 1220 | |
| 1221 return global_template; | 1214 return global_template; |
| 1222 } | 1215 } |
| 1223 | 1216 |
| 1224 | 1217 |
| 1225 void Shell::Initialize(Isolate* isolate) { | 1218 void Shell::Initialize(Isolate* isolate) { |
| 1226 #ifndef V8_SHARED | 1219 #ifndef V8_SHARED |
| 1227 // Set up counters | 1220 // Set up counters |
| 1228 if (i::StrLength(i::FLAG_map_counters) != 0) | 1221 if (i::StrLength(i::FLAG_map_counters) != 0) |
| 1229 MapCounters(isolate, i::FLAG_map_counters); | 1222 MapCounters(isolate, i::FLAG_map_counters); |
| 1230 #endif // !V8_SHARED | 1223 #endif // !V8_SHARED |
| (...skipping 1298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2529 } | 2522 } |
| 2530 | 2523 |
| 2531 } // namespace v8 | 2524 } // namespace v8 |
| 2532 | 2525 |
| 2533 | 2526 |
| 2534 #ifndef GOOGLE3 | 2527 #ifndef GOOGLE3 |
| 2535 int main(int argc, char* argv[]) { | 2528 int main(int argc, char* argv[]) { |
| 2536 return v8::Shell::Main(argc, argv); | 2529 return v8::Shell::Main(argc, argv); |
| 2537 } | 2530 } |
| 2538 #endif | 2531 #endif |
| OLD | NEW |