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

Side by Side Diff: tonic/dart_debugger.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 | « tonic/dart_debugger.h ('k') | 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "mojo/dart/embedder/dart_debugger.h" 5 #include "tonic/dart_debugger.h"
6
6 #include "dart/runtime/include/dart_api.h" 7 #include "dart/runtime/include/dart_api.h"
7 #include "dart/runtime/include/dart_native_api.h" 8 #include "dart/runtime/include/dart_native_api.h"
8 #include "dart/runtime/include/dart_tools_api.h" 9 #include "dart/runtime/include/dart_tools_api.h"
9 10
10 11
11 namespace mojo { 12 namespace tonic {
12 namespace dart { 13
14 MonitorLocker::~MonitorLocker() {
15 monitor_->Exit();
16 }
13 17
14 void DartDebuggerIsolate::MessageLoop() { 18 void DartDebuggerIsolate::MessageLoop() {
15 MonitorLocker ml(&monitor_); 19 MonitorLocker ml(&monitor_);
16 // Request notification on isolate messages. This allows us to 20 // Request notification on isolate messages. This allows us to
17 // respond to vm service messages while at breakpoint. 21 // respond to vm service messages while at breakpoint.
18 Dart_SetMessageNotifyCallback(DartDebugger::NotifyIsolate); 22 Dart_SetMessageNotifyCallback(DartDebugger::NotifyIsolate);
19 while (true) { 23 while (true) {
20 // Handle all available vm service messages, up to a resume 24 // Handle all available vm service messages, up to a resume
21 // request. 25 // request.
22 bool resume = false; 26 bool resume = false;
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 return; 132 return;
129 } 133 }
130 } 134 }
131 NOTREACHED(); 135 NOTREACHED();
132 } 136 }
133 137
134 base::Lock* DartDebugger::lock_ = nullptr; 138 base::Lock* DartDebugger::lock_ = nullptr;
135 std::vector<std::unique_ptr<DartDebuggerIsolate>>* DartDebugger::isolates_ = 139 std::vector<std::unique_ptr<DartDebuggerIsolate>>* DartDebugger::isolates_ =
136 nullptr; 140 nullptr;
137 141
138 } // namespace dart 142 } // namespace tonic
139 } // namespace mojo
OLDNEW
« no previous file with comments | « tonic/dart_debugger.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698