| 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 792 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 803 | 803 |
| 804 Worker* worker = | 804 Worker* worker = |
| 805 static_cast<Worker*>(Local<External>::Cast(this_value)->Value()); | 805 static_cast<Worker*>(Local<External>::Cast(this_value)->Value()); |
| 806 worker->Terminate(); | 806 worker->Terminate(); |
| 807 } | 807 } |
| 808 #endif // !V8_SHARED | 808 #endif // !V8_SHARED |
| 809 | 809 |
| 810 | 810 |
| 811 void Shell::Quit(const v8::FunctionCallbackInfo<v8::Value>& args) { | 811 void Shell::Quit(const v8::FunctionCallbackInfo<v8::Value>& args) { |
| 812 int exit_code = args[0]->Int32Value(); | 812 int exit_code = args[0]->Int32Value(); |
| 813 #ifndef V8_SHARED |
| 814 CleanupWorkers(); |
| 815 #endif // !V8_SHARED |
| 813 OnExit(args.GetIsolate()); | 816 OnExit(args.GetIsolate()); |
| 814 exit(exit_code); | 817 exit(exit_code); |
| 815 } | 818 } |
| 816 | 819 |
| 817 | 820 |
| 818 void Shell::Version(const v8::FunctionCallbackInfo<v8::Value>& args) { | 821 void Shell::Version(const v8::FunctionCallbackInfo<v8::Value>& args) { |
| 819 args.GetReturnValue().Set( | 822 args.GetReturnValue().Set( |
| 820 String::NewFromUtf8(args.GetIsolate(), V8::GetVersion())); | 823 String::NewFromUtf8(args.GetIsolate(), V8::GetVersion())); |
| 821 } | 824 } |
| 822 | 825 |
| (...skipping 1607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2430 } | 2433 } |
| 2431 | 2434 |
| 2432 } // namespace v8 | 2435 } // namespace v8 |
| 2433 | 2436 |
| 2434 | 2437 |
| 2435 #ifndef GOOGLE3 | 2438 #ifndef GOOGLE3 |
| 2436 int main(int argc, char* argv[]) { | 2439 int main(int argc, char* argv[]) { |
| 2437 return v8::Shell::Main(argc, argv); | 2440 return v8::Shell::Main(argc, argv); |
| 2438 } | 2441 } |
| 2439 #endif | 2442 #endif |
| OLD | NEW |