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

Unified Diff: lib/stopwatch.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/regexp.cc ('k') | lib/string.cc » ('j') | vm/bootstrap_natives.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/stopwatch.cc
===================================================================
--- lib/stopwatch.cc (revision 11528)
+++ lib/stopwatch.cc (working copy)
@@ -11,16 +11,13 @@
DEFINE_NATIVE_ENTRY(Stopwatch_now, 0) {
// TODO(iposva): investigate other hi-res time sources such as cycle count.
- const Integer& micros =
- Integer::Handle(Integer::New(OS::GetCurrentTimeMicros()));
- arguments->SetReturn(micros);
+ return Integer::New(OS::GetCurrentTimeMicros());
}
DEFINE_NATIVE_ENTRY(Stopwatch_frequency, 0) {
// TODO(iposva): investigate other hi-res time sources such as cycle count.
- const Integer& frequency = Integer::Handle(Integer::New(1000000));
- arguments->SetReturn(frequency);
+ return Integer::New(1000000);
}
} // namespace dart
« no previous file with comments | « lib/regexp.cc ('k') | lib/string.cc » ('j') | vm/bootstrap_natives.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698