Index: runtime/vm/native_entry.cc |
diff --git a/runtime/vm/native_entry.cc b/runtime/vm/native_entry.cc |
index f89c9a050fa644f458d693554e1f66214d6f85e7..c7e194b7726c6952af1484707ec8124717fdb5bf 100644 |
--- a/runtime/vm/native_entry.cc |
+++ b/runtime/vm/native_entry.cc |
@@ -39,7 +39,7 @@ NativeFunction NativeEntry::ResolveNative(const Library& library, |
int number_of_arguments, |
bool* auto_setup_scope) { |
// Now resolve the native function to the corresponding native entrypoint. |
- if (library.native_entry_resolver() == 0) { |
+ if (library.native_entry_resolver() == NULL) { |
// Native methods are not allowed in the library to which this |
// class belongs in. |
return NULL; |
@@ -62,7 +62,7 @@ const uint8_t* NativeEntry::ResolveSymbolInLibrary(const Library& library, |
uword pc) { |
Dart_NativeEntrySymbol symbol_resolver = |
library.native_entry_symbol_resolver(); |
- if (symbol_resolver == 0) { |
+ if (symbol_resolver == NULL) { |
// Cannot reverse lookup native entries. |
return NULL; |
} |
@@ -232,8 +232,13 @@ static NativeFunction ResolveNativeFunction(Zone* zone, |
ASSERT(!native_name.IsNull()); |
const int num_params = NativeArguments::ParameterCountForResolution(func); |
- return NativeEntry::ResolveNative(library, native_name, num_params, |
- is_auto_scope); |
+ NativeFunction native_function = NativeEntry::ResolveNative( |
+ library, native_name, num_params, is_auto_scope); |
+ if (native_function == NULL) { |
+ FATAL2("Failed to resolve native function '%s' in '%s'\n", |
+ native_name.ToCString(), func.ToQualifiedCString()); |
+ } |
+ return native_function; |
} |