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

Side by Side Diff: runtime/vm/dart_api_impl.cc

Issue 1665253003: Add Dart_GetMessageNotifyCallback for querying the current message notify callback (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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 | « runtime/include/dart_api.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 (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "include/dart_api.h" 5 #include "include/dart_api.h"
6 #include "include/dart_mirrors_api.h" 6 #include "include/dart_mirrors_api.h"
7 #include "include/dart_native_api.h" 7 #include "include/dart_native_api.h"
8 8
9 #include "platform/assert.h" 9 #include "platform/assert.h"
10 #include "lib/stacktrace.h" 10 #include "lib/stacktrace.h"
(...skipping 1559 matching lines...) Expand 10 before | Expand all | Expand 10 after
1570 // --- Messages and Ports --- 1570 // --- Messages and Ports ---
1571 1571
1572 DART_EXPORT void Dart_SetMessageNotifyCallback( 1572 DART_EXPORT void Dart_SetMessageNotifyCallback(
1573 Dart_MessageNotifyCallback message_notify_callback) { 1573 Dart_MessageNotifyCallback message_notify_callback) {
1574 Isolate* isolate = Isolate::Current(); 1574 Isolate* isolate = Isolate::Current();
1575 CHECK_ISOLATE(isolate); 1575 CHECK_ISOLATE(isolate);
1576 isolate->set_message_notify_callback(message_notify_callback); 1576 isolate->set_message_notify_callback(message_notify_callback);
1577 } 1577 }
1578 1578
1579 1579
1580 DART_EXPORT Dart_MessageNotifyCallback Dart_GetMessageNotifyCallback() {
1581 Isolate* isolate = Isolate::Current();
1582 CHECK_ISOLATE(isolate);
1583 return isolate->message_notify_callback();
1584 }
1585
1586
1580 struct RunLoopData { 1587 struct RunLoopData {
1581 Monitor* monitor; 1588 Monitor* monitor;
1582 bool done; 1589 bool done;
1583 }; 1590 };
1584 1591
1585 1592
1586 static void RunLoopDone(uword param) { 1593 static void RunLoopDone(uword param) {
1587 RunLoopData* data = reinterpret_cast<RunLoopData*>(param); 1594 RunLoopData* data = reinterpret_cast<RunLoopData*>(param);
1588 ASSERT(data->monitor != NULL); 1595 ASSERT(data->monitor != NULL);
1589 MonitorLocker ml(data->monitor); 1596 MonitorLocker ml(data->monitor);
(...skipping 4514 matching lines...) Expand 10 before | Expand all | Expand 10 after
6104 return Api::Success(); 6111 return Api::Success();
6105 } 6112 }
6106 #endif // DART_PRECOMPILER 6113 #endif // DART_PRECOMPILER
6107 6114
6108 6115
6109 DART_EXPORT bool Dart_IsRunningPrecompiledCode() { 6116 DART_EXPORT bool Dart_IsRunningPrecompiledCode() {
6110 return Dart::IsRunningPrecompiledCode(); 6117 return Dart::IsRunningPrecompiledCode();
6111 } 6118 }
6112 6119
6113 } // namespace dart 6120 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/include/dart_api.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698