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

Unified Diff: lib/weak_property.cc

Issue 10874072: Use the return value of vm native methods to set the return value, (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
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 | « lib/string.cc ('k') | vm/bootstrap.cc » ('j') | vm/bootstrap_natives.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/weak_property.cc
===================================================================
--- lib/weak_property.cc (revision 11528)
+++ lib/weak_property.cc (working copy)
@@ -16,21 +16,19 @@
const WeakProperty& weak_property = WeakProperty::Handle(WeakProperty::New());
weak_property.set_key(key);
weak_property.set_value(value);
- arguments->SetReturn(weak_property);
+ return weak_property.raw();
}
DEFINE_NATIVE_ENTRY(WeakProperty_getKey, 1) {
GET_NATIVE_ARGUMENT(WeakProperty, weak_property, arguments->At(0));
- const Object& key = Object::Handle(weak_property.key());
- arguments->SetReturn(key);
+ return weak_property.key();
}
DEFINE_NATIVE_ENTRY(WeakProperty_getValue, 1) {
GET_NATIVE_ARGUMENT(WeakProperty, weak_property, arguments->At(0));
- const Object& value = Object::Handle(weak_property.value());
- arguments->SetReturn(value);
+ return weak_property.value();
}
@@ -38,6 +36,7 @@
GET_NATIVE_ARGUMENT(WeakProperty, weak_property, arguments->At(0));
GET_NATIVE_ARGUMENT(Instance, value, arguments->At(1));
weak_property.set_value(value);
+ return Object::null();
}
} // namespace dart
« no previous file with comments | « lib/string.cc ('k') | vm/bootstrap.cc » ('j') | vm/bootstrap_natives.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698