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

Unified Diff: runtime/lib/developer.cc

Issue 1537523002: Add dart:developer.postEvent for posting events to the service protocol from Dart code (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years 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/lib/developer.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/developer.cc
diff --git a/runtime/lib/developer.cc b/runtime/lib/developer.cc
index d2466af22cf8017fef9b6e59da37862b30521ed3..ead1de126a4dbf794a2913358b4f6021b64186bb 100644
--- a/runtime/lib/developer.cc
+++ b/runtime/lib/developer.cc
@@ -60,6 +60,14 @@ DEFINE_NATIVE_ENTRY(Developer_log, 8) {
}
+DEFINE_NATIVE_ENTRY(Developer_postEvent, 2) {
+ GET_NON_NULL_NATIVE_ARGUMENT(String, event_kind, arguments->NativeArgAt(0));
+ GET_NON_NULL_NATIVE_ARGUMENT(String, event_data, arguments->NativeArgAt(1));
+ Service::SendExtensionEvent(isolate, event_kind, event_data);
+ return Object::null();
+}
+
+
DEFINE_NATIVE_ENTRY(Developer_lookupExtension, 1) {
GET_NON_NULL_NATIVE_ARGUMENT(String, name, arguments->NativeArgAt(0));
return isolate->LookupServiceExtensionHandler(name);
« no previous file with comments | « no previous file | runtime/lib/developer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698