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

Side by Side Diff: mojo/dart/embedder/dart_controller.cc

Issue 1595613002: Dart: Remove shutdown workarounds. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 4 years, 11 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 | services/dart/content_handler_main.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 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
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
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
OLDNEW
« no previous file with comments | « no previous file | services/dart/content_handler_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698