| 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 796 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 807 | 807 |
| 808 | 808 |
| 809 void Shell::QuitOnce(v8::FunctionCallbackInfo<v8::Value>* args) { | 809 void Shell::QuitOnce(v8::FunctionCallbackInfo<v8::Value>* args) { |
| 810 int exit_code = (*args)[0] | 810 int exit_code = (*args)[0] |
| 811 ->Int32Value(args->GetIsolate()->GetCurrentContext()) | 811 ->Int32Value(args->GetIsolate()->GetCurrentContext()) |
| 812 .FromMaybe(0); | 812 .FromMaybe(0); |
| 813 #ifndef V8_SHARED | 813 #ifndef V8_SHARED |
| 814 CleanupWorkers(); | 814 CleanupWorkers(); |
| 815 #endif // !V8_SHARED | 815 #endif // !V8_SHARED |
| 816 OnExit(args->GetIsolate()); | 816 OnExit(args->GetIsolate()); |
| 817 exit(exit_code); | 817 Exit(exit_code); |
| 818 } | 818 } |
| 819 | 819 |
| 820 | 820 |
| 821 void Shell::Quit(const v8::FunctionCallbackInfo<v8::Value>& args) { | 821 void Shell::Quit(const v8::FunctionCallbackInfo<v8::Value>& args) { |
| 822 base::CallOnce(&quit_once_, &QuitOnce, | 822 base::CallOnce(&quit_once_, &QuitOnce, |
| 823 const_cast<v8::FunctionCallbackInfo<v8::Value>*>(&args)); | 823 const_cast<v8::FunctionCallbackInfo<v8::Value>*>(&args)); |
| 824 } | 824 } |
| 825 | 825 |
| 826 | 826 |
| 827 void Shell::Version(const v8::FunctionCallbackInfo<v8::Value>& args) { | 827 void Shell::Version(const v8::FunctionCallbackInfo<v8::Value>& args) { |
| (...skipping 1640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2468 } | 2468 } |
| 2469 | 2469 |
| 2470 } // namespace v8 | 2470 } // namespace v8 |
| 2471 | 2471 |
| 2472 | 2472 |
| 2473 #ifndef GOOGLE3 | 2473 #ifndef GOOGLE3 |
| 2474 int main(int argc, char* argv[]) { | 2474 int main(int argc, char* argv[]) { |
| 2475 return v8::Shell::Main(argc, argv); | 2475 return v8::Shell::Main(argc, argv); |
| 2476 } | 2476 } |
| 2477 #endif | 2477 #endif |
| OLD | NEW |