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

Unified Diff: runtime/bin/builtin.cc

Issue 10867032: Beginning support for library prefixes in the dart API. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address review comment. Created 8 years, 4 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
« no previous file with comments | « no previous file | runtime/bin/builtin_nolib.cc » ('j') | runtime/vm/dart_api_impl_test.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/builtin.cc
diff --git a/runtime/bin/builtin.cc b/runtime/bin/builtin.cc
index b2c7e0a22ef8de5dedeb39f75e09be7c46d4a0d6..98c20569ae8c67cdc843de404e857ff6e49c4507 100644
--- a/runtime/bin/builtin.cc
+++ b/runtime/bin/builtin.cc
@@ -26,8 +26,9 @@ static void ImportBuiltinLibIntoLib(
const char* liburl, Dart_Handle builtin_lib) {
Dart_Handle url = Dart_NewString(liburl);
Dart_Handle lib = Dart_LookupLibrary(url);
+ Dart_Handle prefix = Dart_NewString("");
DART_CHECK_VALID(lib);
- DART_CHECK_VALID(Dart_LibraryImportLibrary(lib, builtin_lib));
+ DART_CHECK_VALID(Dart_LibraryImportLibrary(lib, builtin_lib, prefix));
}
@@ -75,6 +76,9 @@ Dart_Handle Builtin::LoadLibrary(BuiltinLibraryId id) {
void Builtin::ImportLibrary(Dart_Handle library, BuiltinLibraryId id) {
Dart_Handle imported_library = LoadLibrary(id);
+ Dart_Handle prefix = Dart_NewString("");
// Import the library into current library.
- DART_CHECK_VALID(Dart_LibraryImportLibrary(library, imported_library));
+ DART_CHECK_VALID(Dart_LibraryImportLibrary(library,
+ imported_library,
+ prefix));
Ivan Posva 2012/08/28 23:22:02 Siva and I discussed this and we feel that being a
Mads Ager (google) 2012/08/29 05:52:10 Sounds good. I updated the code to allow both Dart
}
« no previous file with comments | « no previous file | runtime/bin/builtin_nolib.cc » ('j') | runtime/vm/dart_api_impl_test.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698