Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(175)

Unified Diff: src/d8-windows.cc

Issue 2478473003: [d8] cleanly force exit in d8 on windows. (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/d8-posix.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/d8-windows.cc
diff --git a/src/d8-windows.cc b/src/d8-windows.cc
index ba89c4156fdf0daf8165c93bc78d97ebab9cc733..bf80ad8a8215f1399b790d163c55caa1d602bf44 100644
--- a/src/d8-windows.cc
+++ b/src/d8-windows.cc
@@ -10,5 +10,12 @@ namespace v8 {
void Shell::AddOSMethods(Isolate* isolate, Local<ObjectTemplate> os_templ) {}
+void Shell::Exit(int exit_code) {
+ // Use _exit instead of exit to avoid races between isolate
Michael Achenbach 2016/11/04 10:40:44 This comment doesn't apply anymore.
Yang 2016/11/04 11:54:17 Done.
+ // threads and static destructors.
+ fflush(stdout);
+ fflush(stderr);
+ TerminateProcess(GetCurrentProcess(), exit_code);
Michael Achenbach 2016/11/04 10:40:44 Do we have to wait for the process to exit? Simila
Yang 2016/11/04 11:54:17 good point.
brucedawson 2016/11/04 15:03:48 Actually, I'm pretty sure that other code is wrong
+}
} // namespace v8
« no previous file with comments | « src/d8-posix.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698