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

Side by Side Diff: src/d8.cc

Issue 1231473002: d8 workers: fix race on quit() with context_mutex_ (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix V8_SHARED and omit_quit 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 unified diff | Download patch
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-4279.js » ('j') | 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 792 matching lines...) Expand 10 before | Expand all | Expand 10 after
803 803
804 Worker* worker = 804 Worker* worker =
805 static_cast<Worker*>(Local<External>::Cast(this_value)->Value()); 805 static_cast<Worker*>(Local<External>::Cast(this_value)->Value());
806 worker->Terminate(); 806 worker->Terminate();
807 } 807 }
808 #endif // !V8_SHARED 808 #endif // !V8_SHARED
809 809
810 810
811 void Shell::Quit(const v8::FunctionCallbackInfo<v8::Value>& args) { 811 void Shell::Quit(const v8::FunctionCallbackInfo<v8::Value>& args) {
812 int exit_code = args[0]->Int32Value(); 812 int exit_code = args[0]->Int32Value();
813 #ifndef V8_SHARED
814 CleanupWorkers();
815 #endif // !V8_SHARED
813 OnExit(args.GetIsolate()); 816 OnExit(args.GetIsolate());
814 exit(exit_code); 817 exit(exit_code);
815 } 818 }
816 819
817 820
818 void Shell::Version(const v8::FunctionCallbackInfo<v8::Value>& args) { 821 void Shell::Version(const v8::FunctionCallbackInfo<v8::Value>& args) {
819 args.GetReturnValue().Set( 822 args.GetReturnValue().Set(
820 String::NewFromUtf8(args.GetIsolate(), V8::GetVersion())); 823 String::NewFromUtf8(args.GetIsolate(), V8::GetVersion()));
821 } 824 }
822 825
(...skipping 1607 matching lines...) Expand 10 before | Expand all | Expand 10 after
2430 } 2433 }
2431 2434
2432 } // namespace v8 2435 } // namespace v8
2433 2436
2434 2437
2435 #ifndef GOOGLE3 2438 #ifndef GOOGLE3
2436 int main(int argc, char* argv[]) { 2439 int main(int argc, char* argv[]) {
2437 return v8::Shell::Main(argc, argv); 2440 return v8::Shell::Main(argc, argv);
2438 } 2441 }
2439 #endif 2442 #endif
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-4279.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698