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

Unified Diff: vm/dart_api_impl.cc

Issue 11648006: Create read only handles for empty_array and sentinel objects (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
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
« no previous file with comments | « vm/dart.cc ('k') | vm/dart_entry_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/dart_api_impl.cc
===================================================================
--- vm/dart_api_impl.cc (revision 16415)
+++ vm/dart_api_impl.cc (working copy)
@@ -3577,8 +3577,8 @@
// field object, since the value in the field object will not be
// initialized until the first time the getter is invoked.
const Instance& value = Instance::Handle(isolate, fld.value());
- ASSERT(value.raw() != Object::transition_sentinel());
- return value.raw() == Object::sentinel();
+ ASSERT(value.raw() != Object::transition_sentinel().raw());
+ return value.raw() == Object::sentinel().raw();
}
@@ -3643,8 +3643,8 @@
if (!getter.IsNull()) {
// Invoke the getter and return the result.
- const Array& args = Array::Handle(isolate, Object::empty_array());
- return Api::NewHandle(isolate, DartEntry::InvokeStatic(getter, args));
+ return Api::NewHandle(
+ isolate, DartEntry::InvokeStatic(getter, Object::empty_array()));
} else if (!field.IsNull()) {
return Api::NewHandle(isolate, field.value());
} else {
@@ -3675,8 +3675,8 @@
if (!getter.IsNull()) {
// Invoke the getter and return the result.
- const Array& args = Array::Handle(isolate, Object::empty_array());
- return Api::NewHandle(isolate, DartEntry::InvokeStatic(getter, args));
+ return Api::NewHandle(
+ isolate, DartEntry::InvokeStatic(getter, Object::empty_array()));
} else if (!field.IsNull()) {
return Api::NewHandle(isolate, field.value());
} else {
« no previous file with comments | « vm/dart.cc ('k') | vm/dart_entry_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698