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

Side by Side Diff: sky/engine/core/script/dart_controller.cc

Issue 1028243003: Let Dart code running in Sky add events to the trace timeline (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: more Created 5 years, 9 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 | « sky/engine/core/frame/Window.idl ('k') | sky/examples/stocks-fn/lib/stock_app.dart » ('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 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 "sky/engine/config.h" 5 #include "sky/engine/config.h"
6 #include "sky/engine/core/script/dart_controller.h" 6 #include "sky/engine/core/script/dart_controller.h"
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 Builtin::SetNativeResolver(Builtin::kMojoInternalLibrary); 205 Builtin::SetNativeResolver(Builtin::kMojoInternalLibrary);
206 } 206 }
207 207
208 Dart_ExitIsolate(); 208 Dart_ExitIsolate();
209 209
210 CHECK(Dart_IsolateMakeRunnable(isolate)); 210 CHECK(Dart_IsolateMakeRunnable(isolate));
211 return isolate; 211 return isolate;
212 } 212 }
213 213
214 static void CallHandleMessage(base::WeakPtr<DartState> dart_state) { 214 static void CallHandleMessage(base::WeakPtr<DartState> dart_state) {
215 TRACE_EVENT0("sky", "CallHandleMessage");
216
215 if (!dart_state) 217 if (!dart_state)
216 return; 218 return;
217 219
218 DartIsolateScope scope(dart_state->isolate()); 220 DartIsolateScope scope(dart_state->isolate());
219 DartApiScope api_scope; 221 DartApiScope api_scope;
220 LogIfError(Dart_HandleMessage()); 222 LogIfError(Dart_HandleMessage());
221 } 223 }
222 224
223 static void MessageNotifyCallback(Dart_Isolate dest_isolate) { 225 static void MessageNotifyCallback(Dart_Isolate dest_isolate) {
224 DCHECK(Platform::current()); 226 DCHECK(Platform::current());
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 305
304 CHECK(Dart_SetVMFlags(argc, argv)); 306 CHECK(Dart_SetVMFlags(argc, argv));
305 CHECK(Dart_Initialize(IsolateCreateCallback, 307 CHECK(Dart_Initialize(IsolateCreateCallback,
306 nullptr, // Isolate interrupt callback. 308 nullptr, // Isolate interrupt callback.
307 UnhandledExceptionCallback, IsolateShutdownCallback, 309 UnhandledExceptionCallback, IsolateShutdownCallback,
308 // File IO callbacks. 310 // File IO callbacks.
309 nullptr, nullptr, nullptr, nullptr, nullptr)); 311 nullptr, nullptr, nullptr, nullptr, nullptr));
310 } 312 }
311 313
312 } // namespace blink 314 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/frame/Window.idl ('k') | sky/examples/stocks-fn/lib/stock_app.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698