Fixed evaluation order problem found by GCMole.

TBR=mvstanton@chromium.org

Review URL: https://codereview.chromium.org/14178006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14295 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
svenpanne@chromium.org 2013-04-17 06:25:29 +00:00
parent 0400e05938
commit 627645fed7

View File

@ -825,8 +825,8 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_TypedArrayInitialize) {
ASSERT(byte_length % elementSize == 0);
size_t length = byte_length / elementSize;
holder->set_length(
*isolate->factory()->NewNumber(static_cast<double>(length)));
Handle<Object> length_obj = isolate->factory()->NewNumber(length);
holder->set_length(*length_obj);
Handle<ExternalArray> elements =
isolate->factory()->NewExternalArray(
static_cast<int>(length), arrayType,