Index: runtime/bin/builtin.cc |
diff --git a/runtime/bin/builtin.cc b/runtime/bin/builtin.cc |
index 49ebb05a50b96f71276d2d921ea2508a667fc214..cbc20063738280c799ba3b867b3f8c5f71196feb 100644 |
--- a/runtime/bin/builtin.cc |
+++ b/runtime/bin/builtin.cc |
@@ -110,7 +110,17 @@ Dart_Handle Builtin::GetSource(const char** source_paths, const char* uri) { |
void Builtin::SetNativeResolver(BuiltinLibraryId id) { |
- UNREACHABLE(); |
+ ASSERT(static_cast<int>(id) >= 0); |
+ ASSERT(static_cast<int>(id) < num_libs_); |
+ |
+ if (builtin_libraries_[id].has_natives_) { |
+ Dart_Handle url = DartUtils::NewString(builtin_libraries_[id].url_); |
+ Dart_Handle library = Dart_LookupLibrary(url); |
+ ASSERT(!Dart_IsError(library)); |
+ // Setup the native resolver for built in library functions. |
+ DART_CHECK_VALID( |
+ Dart_SetNativeResolver(library, NativeLookup, NativeSymbol)); |
+ } |
} |