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

Unified Diff: runtime/lib/developer.cc

Issue 1299493007: Rework service extensions to be safe (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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/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 464e89b2448327a2500cdde97b6e0a9e5c7ada8c..d2466af22cf8017fef9b6e59da37862b30521ed3 100644
--- a/runtime/lib/developer.cc
+++ b/runtime/lib/developer.cc
@@ -59,4 +59,18 @@ DEFINE_NATIVE_ENTRY(Developer_log, 8) {
return Object::null();
}
+
+DEFINE_NATIVE_ENTRY(Developer_lookupExtension, 1) {
+ GET_NON_NULL_NATIVE_ARGUMENT(String, name, arguments->NativeArgAt(0));
+ return isolate->LookupServiceExtensionHandler(name);
+}
+
+
+DEFINE_NATIVE_ENTRY(Developer_registerExtension, 2) {
+ GET_NON_NULL_NATIVE_ARGUMENT(String, name, arguments->NativeArgAt(0));
+ GET_NON_NULL_NATIVE_ARGUMENT(Instance, handler, arguments->NativeArgAt(1));
+ isolate->RegisterServiceExtensionHandler(name, handler);
+ return Object::null();
+}
+
} // namespace dart
« 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