| OLD | NEW |
| 1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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 #if !defined(_WIN32) && !defined(_WIN64) | 5 #if !defined(_WIN32) && !defined(_WIN64) |
| 6 #include <unistd.h> // NOLINT | 6 #include <unistd.h> // NOLINT |
| 7 #endif // !defined(_WIN32) && !defined(_WIN64) | 7 #endif // !defined(_WIN32) && !defined(_WIN64) |
| 8 | 8 |
| 9 #include <locale.h> | 9 #include <locale.h> |
| 10 | 10 |
| (...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 662 FrontendChannelImpl frontend_channel(&frontend_runner); | 662 FrontendChannelImpl frontend_channel(&frontend_runner); |
| 663 InspectorClientImpl inspector_client(&backend_runner, &frontend_channel, | 663 InspectorClientImpl inspector_client(&backend_runner, &frontend_channel, |
| 664 &ready_semaphore); | 664 &ready_semaphore); |
| 665 ready_semaphore.Wait(); | 665 ready_semaphore.Wait(); |
| 666 UtilsExtension::set_inspector_client(&inspector_client); | 666 UtilsExtension::set_inspector_client(&inspector_client); |
| 667 | 667 |
| 668 task_runners.push_back(&frontend_runner); | 668 task_runners.push_back(&frontend_runner); |
| 669 task_runners.push_back(&backend_runner); | 669 task_runners.push_back(&backend_runner); |
| 670 | 670 |
| 671 for (int i = 1; i < argc; ++i) { | 671 for (int i = 1; i < argc; ++i) { |
| 672 if (argv[i][0] == '-') break; | 672 // Ignore unknown flags. |
| 673 if (argv[i][0] == '-') continue; |
| 673 | 674 |
| 674 bool exists = false; | 675 bool exists = false; |
| 675 v8::internal::Vector<const char> chars = | 676 v8::internal::Vector<const char> chars = |
| 676 v8::internal::ReadFile(argv[i], &exists, true); | 677 v8::internal::ReadFile(argv[i], &exists, true); |
| 677 if (!exists) { | 678 if (!exists) { |
| 678 fprintf(stderr, "Internal error: script file doesn't exists: %s\n", | 679 fprintf(stderr, "Internal error: script file doesn't exists: %s\n", |
| 679 argv[i]); | 680 argv[i]); |
| 680 Exit(); | 681 Exit(); |
| 681 } | 682 } |
| 682 frontend_runner.Append(new ExecuteStringTask(chars)); | 683 frontend_runner.Append(new ExecuteStringTask(chars)); |
| 683 } | 684 } |
| 684 | 685 |
| 685 frontend_runner.Join(); | 686 frontend_runner.Join(); |
| 686 backend_runner.Join(); | 687 backend_runner.Join(); |
| 687 return 0; | 688 return 0; |
| 688 } | 689 } |
| OLD | NEW |