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

Unified Diff: vm/parser.cc

Issue 8537023: Implement automatic loading of dart:core_native_fields library (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: '' Created 9 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
« vm/dart_api_impl_test.cc ('K') | « vm/object_store.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/parser.cc
===================================================================
--- vm/parser.cc (revision 1545)
+++ vm/parser.cc (working copy)
@@ -3096,9 +3096,18 @@
Dart_Handle Parser::CallLibraryTagHandler(Dart_LibraryTag tag,
- intptr_t token_pos,
- const String& url) {
+ intptr_t token_pos,
+ const String& url) {
Dart_LibraryTagHandler handler = Isolate::Current()->library_tag_handler();
+ bool is_native_flds_library_url = url.Equals("dart:core-native-fields");
Ivan Posva 2011/11/16 19:19:53 I do not see any reason why this library needs to
siva 2011/11/17 00:04:28 Removed. On 2011/11/16 19:19:53, Ivan Posva wrote
+ if (is_native_flds_library_url) {
+ if (tag == kCanonicalizeUrl) {
+ return Api::NewLocalHandle(url);
+ }
+ const Library& library = Library::Handle(Library::LookupLibrary(url));
+ ASSERT(!library.IsNull());
+ return Api::NewLocalHandle(library);
+ }
if (handler == NULL) {
ErrorMsg(token_pos, "no library handler registered");
}
« vm/dart_api_impl_test.cc ('K') | « vm/object_store.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698