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

Unified Diff: runtime/bin/builtin.cc

Issue 9422019: isolates refactor: this change introduces 'dart:isolate' as a library. This is a (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: '' Created 8 years, 10 months 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 8fa1d0e2f21d58950244fc554d747c834c377727..433972bbcbfdfa3da65d781b7c488291389f8d12 100644
--- a/runtime/bin/builtin.cc
+++ b/runtime/bin/builtin.cc
@@ -22,6 +22,14 @@ static void SetupCorelibImports(Dart_Handle builtin_lib) {
DART_CHECK_VALID(Dart_LibraryImportLibrary(coreimpl_lib, builtin_lib));
}
+static void SetupAdditionalImports(Dart_Handle builtin_lib) {
+ // Lookup the isolate library and import the builtin library into them.
+ Dart_Handle url = Dart_NewString(DartUtils::kIsolateLibURL);
+ Dart_Handle isolate_lib = Dart_LookupLibrary(url);
+ DART_CHECK_VALID(isolate_lib);
+ DART_CHECK_VALID(Dart_LibraryImportLibrary(isolate_lib, builtin_lib));
siva 2012/02/22 00:58:20 These 4 lines seem to be repeated a number of time
Siggi Cherem (dart-lang) 2012/02/22 19:18:50 Done.
+}
+
Dart_Handle Builtin::Source(BuiltinLibraryId id) {
Dart_Handle source;
@@ -55,6 +63,7 @@ void Builtin::SetupLibrary(Dart_Handle library, BuiltinLibraryId id) {
} else if (id == kBuiltinLibrary) {
// Setup core lib, builtin import structure.
SetupCorelibImports(library);
+ SetupAdditionalImports(library);
siva 2012/02/22 00:58:20 Are we sure that all these additional libraries wi
Siggi Cherem (dart-lang) 2012/02/22 19:18:50 yes - we are currently loading/compiling them imme
}
// Setup the native resolver for built in library functions.
DART_CHECK_VALID(Dart_SetNativeResolver(library, NativeLookup));

Powered by Google App Engine
This is Rietveld 408576698