| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium 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 "base/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/callback.h" | 6 #include "base/callback.h" |
| 7 #include "base/files/file_util.h" | 7 #include "base/files/file_util.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
| 10 #include "base/rand_util.h" | 10 #include "base/rand_util.h" |
| (...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 604 int vm_flags_count) { | 604 int vm_flags_count) { |
| 605 base::AutoLock al(lock_); | 605 base::AutoLock al(lock_); |
| 606 if (initialized_) { | 606 if (initialized_) { |
| 607 return; | 607 return; |
| 608 } | 608 } |
| 609 | 609 |
| 610 // Start a handle watcher. | 610 // Start a handle watcher. |
| 611 handle_watcher_producer_handle_ = HandleWatcher::Start(); | 611 handle_watcher_producer_handle_ = HandleWatcher::Start(); |
| 612 | 612 |
| 613 const char* kControllerFlags[] = { | 613 const char* kControllerFlags[] = { |
| 614 // TODO(zra): Fix Dart VM Shutdown race. | |
| 615 // There is a bug in Dart VM shutdown which causes its thread pool threads | |
| 616 // to potentially fail to exit when the rest of the VM is going down. This | |
| 617 // results in a segfault if they begin running again after the Dart | |
| 618 // embedder has been unloaded. Setting this flag to 0 ensures that these | |
| 619 // threads sleep forever instead of waking up and trying to run code | |
| 620 // that isn't there anymore. | |
| 621 "--worker-timeout-millis=0", | |
| 622 // Disable access dart:mirrors library. | 614 // Disable access dart:mirrors library. |
| 623 "--enable_mirrors=false", | 615 "--enable_mirrors=false", |
| 624 // Force await and async to be keywords even outside of an async function. | 616 // Force await and async to be keywords even outside of an async function. |
| 625 "--await_is_keyword", | 617 "--await_is_keyword", |
| 626 }; | 618 }; |
| 627 | 619 |
| 628 // Number of flags the controller sets. | 620 // Number of flags the controller sets. |
| 629 const int kNumControllerFlags = arraysize(kControllerFlags); | 621 const int kNumControllerFlags = arraysize(kControllerFlags); |
| 630 const int kNumFlags = vm_flags_count + kNumControllerFlags; | 622 const int kNumFlags = vm_flags_count + kNumControllerFlags; |
| 631 const char* flags[kNumFlags]; | 623 const char* flags[kNumFlags]; |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 742 } | 734 } |
| 743 BlockForServiceIsolateLocked(); | 735 BlockForServiceIsolateLocked(); |
| 744 HandleWatcher::StopAll(); | 736 HandleWatcher::StopAll(); |
| 745 Dart_Cleanup(); | 737 Dart_Cleanup(); |
| 746 service_isolate_running_ = false; | 738 service_isolate_running_ = false; |
| 747 initialized_ = false; | 739 initialized_ = false; |
| 748 } | 740 } |
| 749 | 741 |
| 750 } // namespace apps | 742 } // namespace apps |
| 751 } // namespace mojo | 743 } // namespace mojo |
| OLD | NEW |