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

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

Issue 1902053002: Performance tweaks for Mojo Dart Controller (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 4 years, 8 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 | no next file » | 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 594 matching lines...) Expand 10 before | Expand all | Expand 10 after
605 } 605 }
606 606
607 // Start a handle watcher. 607 // Start a handle watcher.
608 handle_watcher_producer_handle_ = HandleWatcher::Start(); 608 handle_watcher_producer_handle_ = HandleWatcher::Start();
609 609
610 std::vector<const char*> flags; 610 std::vector<const char*> flags;
611 // Disable access dart:mirrors library. 611 // Disable access dart:mirrors library.
612 flags.push_back("--enable_mirrors=false"); 612 flags.push_back("--enable_mirrors=false");
613 // Force await and async to be keywords even outside of an async function. 613 // Force await and async to be keywords even outside of an async function.
614 flags.push_back("--await_is_keyword"); 614 flags.push_back("--await_is_keyword");
615 // Enable background compilation
616 flags.push_back("--background_compilation=true");
617 // Disable code write protection
618 // TODO(johnmccutchan): This might be a security issue once Mojo gets a
619 // security sandbox. Revisit when that happens.
620 flags.push_back("--write_protect_code=false");
615 // Add remaining flags. 621 // Add remaining flags.
616 for (int i = 0; i < vm_flags_count; ++i) { 622 for (int i = 0; i < vm_flags_count; ++i) {
617 flags.push_back(vm_flags[i]); 623 flags.push_back(vm_flags[i]);
618 } 624 }
619 625
620 tonic::DartVM::Config config; 626 tonic::DartVM::Config config;
621 config.vm_isolate_snapshot = vm_isolate_snapshot_buffer; 627 config.vm_isolate_snapshot = vm_isolate_snapshot_buffer;
622 config.create = IsolateCreateCallback; 628 config.create = IsolateCreateCallback;
623 config.shutdown = IsolateShutdownCallback; 629 config.shutdown = IsolateShutdownCallback;
624 config.entropy_source = entropy; 630 config.entropy_source = entropy;
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
714 } 720 }
715 BlockForServiceIsolateLocked(); 721 BlockForServiceIsolateLocked();
716 HandleWatcher::StopAll(); 722 HandleWatcher::StopAll();
717 CHECK(tonic::DartVM::Cleanup()); 723 CHECK(tonic::DartVM::Cleanup());
718 service_isolate_running_ = false; 724 service_isolate_running_ = false;
719 initialized_ = false; 725 initialized_ = false;
720 } 726 }
721 727
722 } // namespace apps 728 } // namespace apps
723 } // namespace mojo 729 } // namespace mojo
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698