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

Unified Diff: runtime/vm/dart_api_impl.cc

Issue 2524853002: Add RETURN_NULL_ERROR to new apis (Closed)
Patch Set: 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 | « no previous file | 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 29f2b025f220729030a1294a916908d8515ea6eb..22c739305beae65933db4a48f90786656b2a7a3b 100644
--- a/runtime/vm/dart_api_impl.cc
+++ b/runtime/vm/dart_api_impl.cc
@@ -5888,6 +5888,9 @@ Dart_SetNativeResolver(Dart_Handle library,
DART_EXPORT Dart_Handle
Dart_GetNativeResolver(Dart_Handle library,
Dart_NativeEntryResolver* resolver) {
+ if (resolver == NULL) {
+ RETURN_NULL_ERROR(resolver);
+ }
*resolver = NULL;
DARTSCOPE(Thread::Current());
const Library& lib = Api::UnwrapLibraryHandle(Z, library);
@@ -5901,6 +5904,9 @@ Dart_GetNativeResolver(Dart_Handle library,
DART_EXPORT Dart_Handle Dart_GetNativeSymbol(Dart_Handle library,
Dart_NativeEntrySymbol* resolver) {
+ if (resolver == NULL) {
+ RETURN_NULL_ERROR(resolver);
+ }
*resolver = NULL;
DARTSCOPE(Thread::Current());
const Library& lib = Api::UnwrapLibraryHandle(Z, library);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698