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

Unified Diff: runtime/vm/dart_api_impl.cc

Issue 2518233003: Wire up the stub native resolver for all libraries in gen_snapshot (Closed)
Patch Set: rmacnak in person review Created 4 years, 1 month 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 | « runtime/include/dart_api.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/dart_api_impl.cc
diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc
index e58810d318daf5a30e1b6b9a3f8fbb2fe7dea95c..9f4c9468e6301877f1622ed81036709477482e1c 100644
--- a/runtime/vm/dart_api_impl.cc
+++ b/runtime/vm/dart_api_impl.cc
@@ -5865,6 +5865,32 @@ Dart_SetNativeResolver(Dart_Handle library,
}
+DART_EXPORT Dart_Handle
+Dart_GetNativeResolver(Dart_Handle library,
+ Dart_NativeEntryResolver* resolver) {
siva 2016/11/22 20:48:47 if (resolver == NULL) { RETURN_NULL_ERROR(resolv
+ *resolver = NULL;
+ DARTSCOPE(Thread::Current());
+ const Library& lib = Api::UnwrapLibraryHandle(Z, library);
+ if (lib.IsNull()) {
+ RETURN_TYPE_ERROR(Z, library, Library);
+ }
+ *resolver = lib.native_entry_resolver();
+ return Api::Success();
+}
+
+
+DART_EXPORT Dart_Handle Dart_GetNativeSymbol(Dart_Handle library,
+ Dart_NativeEntrySymbol* resolver) {
siva 2016/11/22 20:48:47 if (resolver == NULL) { RETURN_NULL_ERROR(resolv
+ *resolver = NULL;
+ DARTSCOPE(Thread::Current());
+ const Library& lib = Api::UnwrapLibraryHandle(Z, library);
+ if (lib.IsNull()) {
+ RETURN_TYPE_ERROR(Z, library, Library);
+ }
+ *resolver = lib.native_entry_symbol_resolver();
+ return Api::Success();
+}
+
// --- Peer support ---
DART_EXPORT Dart_Handle Dart_GetPeer(Dart_Handle object, void** peer) {
« 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