| Index: runtime/bin/builtin_natives.cc
|
| diff --git a/runtime/bin/builtin_natives.cc b/runtime/bin/builtin_natives.cc
|
| index 96280df35da2e5d4ed42bc5609da48581b70649d..dc6ee178879cd38966a7fc3896d3fe475c11a71e 100644
|
| --- a/runtime/bin/builtin_natives.cc
|
| +++ b/runtime/bin/builtin_natives.cc
|
| @@ -44,6 +44,12 @@ static struct NativeEntries {
|
| };
|
|
|
|
|
| +void Builtin_DummyNative(Dart_NativeArguments args) {
|
| + UNREACHABLE();
|
| +}
|
| +
|
| +
|
| +
|
| /**
|
| * Looks up native functions in both libdart_builtin and libdart_io.
|
| */
|
| @@ -51,8 +57,8 @@ Dart_NativeFunction Builtin::NativeLookup(Dart_Handle name,
|
| int argument_count,
|
| bool* auto_setup_scope) {
|
| const char* function_name = NULL;
|
| - Dart_Handle result = Dart_StringToCString(name, &function_name);
|
| - DART_CHECK_VALID(result);
|
| + Dart_Handle err = Dart_StringToCString(name, &function_name);
|
| + DART_CHECK_VALID(err);
|
| ASSERT(function_name != NULL);
|
| ASSERT(auto_setup_scope != NULL);
|
| *auto_setup_scope = true;
|
| @@ -64,7 +70,12 @@ Dart_NativeFunction Builtin::NativeLookup(Dart_Handle name,
|
| return reinterpret_cast<Dart_NativeFunction>(entry->function_);
|
| }
|
| }
|
| - return IONativeLookup(name, argument_count, auto_setup_scope);
|
| + Dart_NativeFunction result =
|
| + IONativeLookup(name, argument_count, auto_setup_scope);
|
| + if (result == NULL) {
|
| + result = Builtin_DummyNative;
|
| + }
|
| + return result;
|
| }
|
|
|
|
|
|
|