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

Unified Diff: src/runtime.cc

Issue 15204002: Remove one more unneccessary conversion to double. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index 434ad8fbd583ffefc8560f4ff2f0142f9a817790..849ddbf9910a388d2610cc7b9e45ac189a21e0dd 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -676,7 +676,7 @@ bool Runtime::SetupArrayBuffer(Isolate* isolate,
array_buffer->set_backing_store(data);
Handle<Object> byte_length =
- isolate->factory()->NewNumber(static_cast<double>(allocated_length));
+ isolate->factory()->NewNumberFromSize(allocated_length);
CHECK(byte_length->IsSmi() || byte_length->IsHeapNumber());
array_buffer->set_byte_length(*byte_length);
return true;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698