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

Unified Diff: lib/object.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/mirrors.cc ('k') | lib/regexp.cc » ('j') | vm/bootstrap_natives.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/object.cc
===================================================================
--- lib/object.cc (revision 11528)
+++ lib/object.cc (working copy)
@@ -13,7 +13,7 @@
DEFINE_NATIVE_ENTRY(Object_toString, 1) {
const Instance& instance = Instance::CheckedHandle(arguments->At(0));
const char* c_str = instance.ToCString();
- arguments->SetReturn(String::Handle(String::New(c_str)));
+ return String::New(c_str);
}
@@ -53,6 +53,7 @@
dart_arguments.Add(&array);
}
Exceptions::ThrowByType(Exceptions::kNoSuchMethod, dart_arguments);
+ return Object::null();
}
} // namespace dart
« no previous file with comments | « lib/mirrors.cc ('k') | lib/regexp.cc » ('j') | vm/bootstrap_natives.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698