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

Unified Diff: runtime/bin/builtin_natives.cc

Issue 25646004: Add Dart_PostPriority function to dart_api, and use it in runAsync to schedule immediate events in … (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: More cleanup Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/bin/common_patch.dart » ('j') | runtime/vm/message.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/builtin_natives.cc
diff --git a/runtime/bin/builtin_natives.cc b/runtime/bin/builtin_natives.cc
index 48c10fbd8592f80c3461ddb0c1cfe648f918835f..b0b7f430a33b8aaa9c07dedfaaca850ff2f8d48a 100644
--- a/runtime/bin/builtin_natives.cc
+++ b/runtime/bin/builtin_natives.cc
@@ -63,6 +63,7 @@ namespace bin {
V(FileSystemWatcher_ReadEvents, 1) \
V(FileSystemWatcher_UnwatchPath, 1) \
V(FileSystemWatcher_WatchPath, 4) \
+ V(DartAPI_SendPriority, 2) \
V(Logger_PrintString, 1)
BUILTIN_NATIVE_LIST(DECLARE_FUNCTION);
@@ -115,5 +116,14 @@ void FUNCTION_NAME(Logger_PrintString)(Dart_NativeArguments args) {
}
}
+
+void FUNCTION_NAME(DartAPI_SendPriority)(Dart_NativeArguments args) {
+ Dart_Handle port = Dart_GetNativeArgument(args, 0);
+ Dart_Handle msg = Dart_GetNativeArgument(args, 1);
+ Dart_Handle id = Dart_GetField(port, DartUtils::NewString("_id"));
+ Dart_Port port_id = DartUtils::GetIntegerValue(id);
+ Dart_PostPriority(port_id, msg);
+}
+
} // namespace bin
} // namespace dart
« no previous file with comments | « no previous file | runtime/bin/common_patch.dart » ('j') | runtime/vm/message.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698