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

Side by Side Diff: src/d8.cc

Issue 2529363002: Revert "[d8] cleanly force exit in d8 on windows." (Closed)
Patch Set: Created 4 years 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 | src/d8-posix.cc » ('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 #include <errno.h> 5 #include <errno.h>
6 #include <stdlib.h> 6 #include <stdlib.h>
7 #include <string.h> 7 #include <string.h>
8 #include <sys/stat.h> 8 #include <sys/stat.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 1607 matching lines...) Expand 10 before | Expand all | Expand 10 after
1618 factory->NewJSArrayWithElements(arguments_array); 1618 factory->NewJSArrayWithElements(arguments_array);
1619 context->Global() 1619 context->Global()
1620 ->Set(context, 1620 ->Set(context,
1621 String::NewFromUtf8(isolate, "arguments", NewStringType::kNormal) 1621 String::NewFromUtf8(isolate, "arguments", NewStringType::kNormal)
1622 .ToLocalChecked(), 1622 .ToLocalChecked(),
1623 Utils::ToLocal(arguments_jsarray)) 1623 Utils::ToLocal(arguments_jsarray))
1624 .FromJust(); 1624 .FromJust();
1625 return handle_scope.Escape(context); 1625 return handle_scope.Escape(context);
1626 } 1626 }
1627 1627
1628
1629 void Shell::Exit(int exit_code) {
1630 // Use _exit instead of exit to avoid races between isolate
1631 // threads and static destructors.
1632 fflush(stdout);
1633 fflush(stderr);
1634 _exit(exit_code);
1635 }
1636
1637
1628 struct CounterAndKey { 1638 struct CounterAndKey {
1629 Counter* counter; 1639 Counter* counter;
1630 const char* key; 1640 const char* key;
1631 }; 1641 };
1632 1642
1633 1643
1634 inline bool operator<(const CounterAndKey& lhs, const CounterAndKey& rhs) { 1644 inline bool operator<(const CounterAndKey& lhs, const CounterAndKey& rhs) {
1635 return strcmp(lhs.key, rhs.key) < 0; 1645 return strcmp(lhs.key, rhs.key) < 0;
1636 } 1646 }
1637 1647
(...skipping 1382 matching lines...) Expand 10 before | Expand all | Expand 10 after
3020 } 3030 }
3021 3031
3022 } // namespace v8 3032 } // namespace v8
3023 3033
3024 3034
3025 #ifndef GOOGLE3 3035 #ifndef GOOGLE3
3026 int main(int argc, char* argv[]) { 3036 int main(int argc, char* argv[]) {
3027 return v8::Shell::Main(argc, argv); 3037 return v8::Shell::Main(argc, argv);
3028 } 3038 }
3029 #endif 3039 #endif
OLDNEW
« no previous file with comments | « no previous file | src/d8-posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698