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

Unified Diff: runtime/vm/dart_entry.cc

Issue 11441021: Pass handles not raw objects into methods. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years 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/vm/dart_entry.cc
===================================================================
--- runtime/vm/dart_entry.cc (revision 15741)
+++ runtime/vm/dart_entry.cc (working copy)
@@ -119,8 +119,8 @@
}
-ArgumentsDescriptor::ArgumentsDescriptor(RawObject* array)
- : array_(Array::CheckedHandle(array)) {
+ArgumentsDescriptor::ArgumentsDescriptor(const Array& array)
+ : array_(array) {
}
@@ -134,10 +134,12 @@
}
-RawObject* ArgumentsDescriptor::NameAt(intptr_t index) const {
- return array_.At(kFirstNamedEntryIndex +
- (index * kNamedEntrySize) +
- kNameOffset);
+RawString* ArgumentsDescriptor::NameAt(intptr_t index) const {
+ String& result = String::Handle();
Florian Schneider 2012/12/06 09:48:16 Allocating a handle just for casting seems an expe
Kevin Millikin (Google) 2012/12/06 10:44:02 The only caller just does pointer equality to RawS
+ result ^= array_.At(kFirstNamedEntryIndex +
+ (index * kNamedEntrySize) +
+ kNameOffset);
+ return result.raw();
}

Powered by Google App Engine
This is Rietveld 408576698