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

Side by Side Diff: src/d8.cc

Issue 1294913005: [d8] Fix flakiness when calling quit() with isolates (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698