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

Unified Diff: runtime/vm/code_generator_test.cc

Issue 10414084: Replace linked list of loaded libraries (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 7 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/vm/dart_api_impl_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/code_generator_test.cc
===================================================================
--- runtime/vm/code_generator_test.cc (revision 7922)
+++ runtime/vm/code_generator_test.cc (working copy)
@@ -488,8 +488,14 @@
Object& result = Object::Handle();
result = DartEntry::InvokeStatic(function, arguments, kNoArgumentNames);
EXPECT(!result.IsError());
- const Library& app_lib = Library::Handle(
- Isolate::Current()->object_store()->registered_libraries());
+ const GrowableObjectArray& libs = GrowableObjectArray::Handle(
+ Isolate::Current()->object_store()->libraries());
+ ASSERT(!libs.IsNull());
+ // App lib is the last one that was loaded.
+ intptr_t num_libs = libs.Length();
+ Library& app_lib = Library::Handle();
+ app_lib ^= libs.At(num_libs - 1);
+ ASSERT(!app_lib.IsNull());
const Class& cls = Class::Handle(
app_lib.LookupClass(String::Handle(String::NewSymbol("A"))));
EXPECT_EQ(cls.raw(), result.clazz());
« no previous file with comments | « no previous file | runtime/vm/dart_api_impl_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698