v8/src/d8-windows.cc
yangguo 639f6f1774 [d8] cleanly force exit in d8 on windows.
Using _exit on windows may cause race conditions in threads.

BUG=chromium:603131

Review-Url: https://codereview.chromium.org/2478473003
Cr-Commit-Position: refs/heads/master@{#40789}
2016-11-07 07:25:38 +00:00

22 lines
521 B
C++

// Copyright 2009 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "src/d8.h"
namespace v8 {
void Shell::AddOSMethods(Isolate* isolate, Local<ObjectTemplate> os_templ) {}
void Shell::Exit(int exit_code) {
// Use TerminateProcess avoid races between isolate threads and
// static destructors.
fflush(stdout);
fflush(stderr);
TerminateProcess(GetCurrentProcess(), exit_code);
}
} // namespace v8