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

Unified Diff: vm/native_entry_test.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
« vm/native_entry.h ('K') | « vm/native_entry.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/native_entry_test.cc
===================================================================
--- vm/native_entry_test.cc (revision 11327)
+++ vm/native_entry_test.cc (working copy)
@@ -51,7 +51,7 @@
const Smi& right = Smi::CheckedHandle(arguments->At(1));
// Ignoring overflow in the calculation below.
intptr_t result = left.Value() - right.Value();
- arguments->SetReturn(Smi::Handle(Smi::New(result)));
+ return Smi::New(result);
}
@@ -65,7 +65,7 @@
// Ignoring overflow in the addition below.
result += arg.Value();
}
- arguments->SetReturn(Smi::Handle(Smi::New(result)));
+ return Smi::New(result);
}
@@ -84,6 +84,7 @@
const uword function_entry_address =
Code::Handle(target_function.CurrentCode()).EntryPoint();
EXPECT_EQ(function_entry_address, target_address);
+ return Object::null();
}
} // namespace dart
« vm/native_entry.h ('K') | « vm/native_entry.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698