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

Unified Diff: runtime/bin/builtin.cc

Issue 11360121: When building standalone Dart executable, put implementation of dart:io natives in a separate libra… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix grammar. Created 8 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
Index: runtime/bin/builtin.cc
diff --git a/runtime/bin/builtin.cc b/runtime/bin/builtin.cc
index f6d297e9c8435400cc0f83f30b2803f9a150fdfd..5de4f64de8c55e5193735ef5ddef37935f0106b1 100644
--- a/runtime/bin/builtin.cc
+++ b/runtime/bin/builtin.cc
@@ -30,6 +30,13 @@ Dart_Handle Builtin::Source(BuiltinLibraryId id) {
}
+Dart_NativeFunction Builtin::NativeLookup(Dart_Handle name,
+ int argument_count) {
+ UNREACHABLE();
+ return NULL;
+}
+
+
void Builtin::SetNativeResolver(BuiltinLibraryId id) {
UNREACHABLE();
}
@@ -45,7 +52,11 @@ Dart_Handle Builtin::LoadAndCheckLibrary(BuiltinLibraryId id) {
library = Dart_LoadLibrary(url, Source(id));
if (!Dart_IsError(library) && (builtin_libraries_[id].has_natives_)) {
// Setup the native resolver for built in library functions.
- DART_CHECK_VALID(Dart_SetNativeResolver(library, NativeLookup));
+ // Looks up native functions only in libdart_builtin, not libdart_io.
+ // This is for use in the snapshot generator, which must not link with
Mads Ager (google) 2012/11/08 09:32:26 Instead of focusing this comment on the problem ca
+ // the native implementations for libdart_io, to break the dependence
+ // of Dartium on our copies of NSS and NSPR (secure networking libraries).
+ DART_CHECK_VALID(Dart_SetNativeResolver(library, BuiltinNativeLookup));
}
if (builtin_libraries_[id].patch_url_ != NULL) {
ASSERT(builtin_libraries_[id].patch_source_ != NULL);

Powered by Google App Engine
This is Rietveld 408576698