From a42da8e38d7a780a90549f581ab23724e90c258e Mon Sep 17 00:00:00 2001 From: "danno@chromium.org" Date: Wed, 11 Jan 2012 15:10:56 +0000 Subject: [PATCH] Correct nits in d8 ArrayBuffer() implementation TBR=jkummerow@chromium.org BUG=none TEST=external-array.js Review URL: http://codereview.chromium.org/9185006 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10390 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/d8.cc | 4 ++-- test/mjsunit/external-array.js | 8 +------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/src/d8.cc b/src/d8.cc index 927d536..97828a4 100644 --- a/src/d8.cc +++ b/src/d8.cc @@ -387,8 +387,8 @@ Handle Shell::CreateExternalArray(const Arguments& args, } if (offset > array_buffer_length) { - return ThrowException( - String::New("byteOffset must be less than ArrayBuffer length.")); + return ThrowException( + String::New("byteOffset must be less than ArrayBuffer length.")); } if (args.Length() == 2) { diff --git a/test/mjsunit/external-array.js b/test/mjsunit/external-array.js index 7bc882f..72cfd85 100644 --- a/test/mjsunit/external-array.js +++ b/test/mjsunit/external-array.js @@ -1,4 +1,4 @@ -// Copyright 2011 the V8 project authors. All rights reserved. +// Copyright 2012 the V8 project authors. All rights reserved. // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -60,12 +60,6 @@ assertEquals(2, derived_uint32_2.length); var derived_uint32_3 = new Uint32Array(ab,4,1); assertEquals(1, derived_uint32_3.length); -// Resulting array length of zero should fail. -function abfunc2() { - new Uint32Array(ab,3); -} -assertThrows(abfunc2); - // If a given byteOffset and length references an area beyond the end of the // ArrayBuffer an exception is raised. function abfunc3() { -- 2.7.4