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

Unified Diff: src/d8.cc

Issue 1235083004: Revert of d8 workers: make sure Shell::Quit is only called once (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 5 months 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.h ('k') | test/mjsunit/mjsunit.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/d8.cc
diff --git a/src/d8.cc b/src/d8.cc
index d882e45b24fa198748d4071aa6845cdb40c9ea58..2b1832a28e6c7e5ccba73900cebfc0346d8851f5 100644
--- a/src/d8.cc
+++ b/src/d8.cc
@@ -216,7 +216,6 @@
ArrayBuffer::Allocator* Shell::array_buffer_allocator;
ShellOptions Shell::options;
const char* Shell::kPrompt = "d8> ";
-base::OnceType Shell::quit_once_ = V8_ONCE_INIT;
#ifndef V8_SHARED
bool CounterMap::Match(void* key1, void* key2) {
@@ -810,19 +809,13 @@
#endif // !V8_SHARED
-void Shell::QuitOnce(v8::FunctionCallbackInfo<v8::Value>* args) {
- int exit_code = (*args)[0]->Int32Value();
+void Shell::Quit(const v8::FunctionCallbackInfo<v8::Value>& args) {
+ int exit_code = args[0]->Int32Value();
#ifndef V8_SHARED
CleanupWorkers();
#endif // !V8_SHARED
- OnExit(args->GetIsolate());
+ OnExit(args.GetIsolate());
exit(exit_code);
-}
-
-
-void Shell::Quit(const v8::FunctionCallbackInfo<v8::Value>& args) {
- base::CallOnce(&quit_once_, &QuitOnce,
- const_cast<v8::FunctionCallbackInfo<v8::Value>*>(&args));
}
« no previous file with comments | « src/d8.h ('k') | test/mjsunit/mjsunit.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698