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

Unified Diff: runtime/vm/object.cc

Issue 10827434: - Pass the correct version of handle reference to Class::NewNativeWrapper. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: 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 | « runtime/vm/object.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
===================================================================
--- runtime/vm/object.cc (revision 11007)
+++ runtime/vm/object.cc (working copy)
@@ -1782,10 +1782,10 @@
}
-RawClass* Class::NewNativeWrapper(Library* library,
+RawClass* Class::NewNativeWrapper(const Library& library,
const String& name,
int field_count) {
- Class& cls = Class::Handle(library->LookupClass(name));
+ Class& cls = Class::Handle(library.LookupClass(name));
if (cls.IsNull()) {
const Array& empty_array = Array::Handle(Object::empty_array());
cls = New<Instance>(name, Script::Handle(), Scanner::kDummyTokenIndex);
@@ -1799,7 +1799,7 @@
cls.set_next_field_offset(instance_size);
cls.set_num_native_fields(field_count);
cls.set_is_finalized();
- library->AddClass(cls);
+ library.AddClass(cls);
return cls.raw();
} else {
return Class::null();
@@ -6232,7 +6232,7 @@
ASSERT(kNumNativeWrappersClasses > 0 && kNumNativeWrappersClasses < 10);
const String& native_flds_lib_url = String::Handle(
Symbols::New("dart:nativewrappers"));
- Library& native_flds_lib = Library::Handle(
+ const Library& native_flds_lib = Library::Handle(
Library::NewLibraryHelper(native_flds_lib_url, false));
native_flds_lib.Register();
isolate->object_store()->set_native_wrappers_library(native_flds_lib);
@@ -6248,7 +6248,7 @@
kNativeWrappersClass,
fld_cnt);
cls_name = Symbols::New(name_buffer);
- Class::NewNativeWrapper(&native_flds_lib, cls_name, fld_cnt);
+ Class::NewNativeWrapper(native_flds_lib, cls_name, fld_cnt);
}
}
« no previous file with comments | « runtime/vm/object.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698