OLD | NEW |
1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 #include "src/d8.h" | 5 #include "src/d8.h" |
6 | 6 |
7 | 7 |
8 namespace v8 { | 8 namespace v8 { |
9 | 9 |
10 | 10 |
11 void Shell::AddOSMethods(Isolate* isolate, Local<ObjectTemplate> os_templ) {} | 11 void Shell::AddOSMethods(Isolate* isolate, Local<ObjectTemplate> os_templ) {} |
12 | 12 |
| 13 void Shell::Exit(int exit_code) { |
| 14 // Use TerminateProcess avoid races between isolate threads and |
| 15 // static destructors. |
| 16 fflush(stdout); |
| 17 fflush(stderr); |
| 18 TerminateProcess(GetCurrentProcess(), exit_code); |
| 19 } |
13 | 20 |
14 } // namespace v8 | 21 } // namespace v8 |
OLD | NEW |