Revision: 17974
Author:   [email protected]
Date:     Thu Nov 21 15:06:14 2013 UTC
Log:      Fix previous backmerge (3.21.18.10 / r17958)

[email protected]

Review URL: https://codereview.chromium.org/80753004
http://code.google.com/p/v8/source/detail?r=17974

Modified:
 /branches/3.21/src/typedarray.js
 /branches/3.21/src/version.cc

=======================================
--- /branches/3.21/src/typedarray.js    Thu Nov 21 10:28:12 2013 UTC
+++ /branches/3.21/src/typedarray.js    Thu Nov 21 15:06:14 2013 UTC
@@ -69,6 +69,9 @@

   function ConstructByLength(obj, length) {
     var l = ToPositiveInteger(length, "invalid_typed_array_length");
+    if (l > %MaxSmi()) {
+      throw MakeRangeError("invalid_typed_array_length");
+    }
     var byteLength = l * elementSize;
     var buffer = new global.ArrayBuffer(byteLength);
     %TypedArrayInitialize(obj, arrayId, buffer, 0, byteLength);
@@ -77,9 +80,6 @@
   function ConstructByArrayLike(obj, arrayLike) {
     var length = arrayLike.length;
     var l =  ToPositiveInteger(length, "invalid_typed_array_length");
-    if (l > %MaxSmi()) {
-      throw MakeRangeError("invalid_typed_array_length");
-    }
     if(!%TypedArrayInitializeFromArrayLike(obj, arrayId, arrayLike, l)) {
       for (var i = 0; i < l; i++) {
         obj[i] = arrayLike[i];
=======================================
--- /branches/3.21/src/version.cc       Thu Nov 21 14:28:01 2013 UTC
+++ /branches/3.21/src/version.cc       Thu Nov 21 15:06:14 2013 UTC
@@ -35,7 +35,7 @@
 #define MAJOR_VERSION     3
 #define MINOR_VERSION     21
 #define BUILD_NUMBER      18
-#define PATCH_LEVEL       11
+#define PATCH_LEVEL       12
 // Use 1 for candidates and 0 otherwise.
 // (Boolean macro values are not supported by all preprocessors.)
 #define IS_CANDIDATE_VERSION 0

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to