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

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

Issue 1245243002: Move dart_debugger into tonic and use it in mojo dart controller (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 5 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 | « mojo/dart/embedder/BUILD.gn ('k') | mojo/dart/embedder/dart_debugger.h » ('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/callback.h" 5 #include "base/callback.h"
6 #include "base/files/file_util.h" 6 #include "base/files/file_util.h"
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "base/rand_util.h" 9 #include "base/rand_util.h"
10 #include "base/sys_info.h" 10 #include "base/sys_info.h"
11 #include "dart/runtime/include/dart_api.h" 11 #include "dart/runtime/include/dart_api.h"
12 #include "dart/runtime/include/dart_native_api.h" 12 #include "dart/runtime/include/dart_native_api.h"
13 #include "mojo/dart/embedder/builtin.h" 13 #include "mojo/dart/embedder/builtin.h"
14 #include "mojo/dart/embedder/dart_controller.h" 14 #include "mojo/dart/embedder/dart_controller.h"
15 #include "mojo/dart/embedder/dart_debugger.h"
16 #include "mojo/dart/embedder/dart_state.h" 15 #include "mojo/dart/embedder/dart_state.h"
17 #include "mojo/dart/embedder/vmservice.h" 16 #include "mojo/dart/embedder/vmservice.h"
18 #include "mojo/public/c/system/core.h" 17 #include "mojo/public/c/system/core.h"
18 #include "tonic/dart_debugger.h"
19 19
20 namespace mojo { 20 namespace mojo {
21 namespace dart { 21 namespace dart {
22 22
23 extern const uint8_t* vm_isolate_snapshot_buffer; 23 extern const uint8_t* vm_isolate_snapshot_buffer;
24 extern const uint8_t* isolate_snapshot_buffer; 24 extern const uint8_t* isolate_snapshot_buffer;
25 25
26 const char* kDartScheme = "dart:"; 26 const char* kDartScheme = "dart:";
27 const char* kAsyncLibURL = "dart:async"; 27 const char* kAsyncLibURL = "dart:async";
28 const char* kInternalLibURL = "dart:_internal"; 28 const char* kInternalLibURL = "dart:_internal";
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after
555 args[0] = "--worker-timeout-millis=0"; 555 args[0] = "--worker-timeout-millis=0";
556 556
557 for (int i = 0; i < arguments_count; ++i) { 557 for (int i = 0; i < arguments_count; ++i) {
558 args[i + 1] = arguments[i]; 558 args[i + 1] = arguments[i];
559 } 559 }
560 560
561 bool result = Dart_SetVMFlags(kNumArgs, args); 561 bool result = Dart_SetVMFlags(kNumArgs, args);
562 CHECK(result); 562 CHECK(result);
563 563
564 // This should be called before calling Dart_Initialize. 564 // This should be called before calling Dart_Initialize.
565 DartDebugger::InitDebugger(); 565 tonic::DartDebugger::InitDebugger();
566 566
567 result = Dart_Initialize(vm_isolate_snapshot_buffer, 567 result = Dart_Initialize(vm_isolate_snapshot_buffer,
568 IsolateCreateCallback, 568 IsolateCreateCallback,
569 nullptr, // Isolate interrupt callback. 569 nullptr, // Isolate interrupt callback.
570 UnhandledExceptionCallback, 570 UnhandledExceptionCallback,
571 IsolateShutdownCallback, 571 IsolateShutdownCallback,
572 // File IO callbacks. 572 // File IO callbacks.
573 nullptr, nullptr, nullptr, nullptr, 573 nullptr, nullptr, nullptr, nullptr,
574 entropy); 574 entropy);
575 CHECK(result); 575 CHECK(result);
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
737 737
738 void DartController::Shutdown() { 738 void DartController::Shutdown() {
739 StopHandleWatcherIsolate(); 739 StopHandleWatcherIsolate();
740 Dart_Cleanup(); 740 Dart_Cleanup();
741 service_isolate_running_ = false; 741 service_isolate_running_ = false;
742 initialized_ = false; 742 initialized_ = false;
743 } 743 }
744 744
745 } // namespace apps 745 } // namespace apps
746 } // namespace mojo 746 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/dart/embedder/BUILD.gn ('k') | mojo/dart/embedder/dart_debugger.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698