Backed out changeset e2bca303ae69 (bug 1296249) for bug1296249.js failures
authorPhil Ringnalda <philringnalda@gmail.com>
Tue, 13 Sep 2016 19:08:44 -0700
changeset 313755 afd6ad990dd40ac22dc374bed51e333c25288243
parent 313754 32fb14de50feb0a1334c75a79ebab6fe7d9b3db5
child 313756 002b4c56b913fcce358c53ee69d70cc777ba5fa4
push id30697
push usercbook@mozilla.com
push dateWed, 14 Sep 2016 10:04:12 +0000
treeherdermozilla-central@de96dcebba86 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1296249
milestone51.0a1
backs oute2bca303ae69caecec7d91396b8a04be9922e0fa
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset e2bca303ae69 (bug 1296249) for bug1296249.js failures CLOSED TREE
js/src/jit-test/tests/basic/bug1296249.js
js/src/jit/MacroAssembler.cpp
deleted file mode 100644
--- a/js/src/jit-test/tests/basic/bug1296249.js
+++ /dev/null
@@ -1,10 +0,0 @@
-function f(x) {
-    new Int32Array(x);
-}
-f(0);
-try {
-    f(2147483647);
-} catch(e) {
-    assertEq(e instanceof InternalError, true,
-             "expected InternalError, instead threw: " + e);
-}
--- a/js/src/jit/MacroAssembler.cpp
+++ b/js/src/jit/MacroAssembler.cpp
@@ -1057,22 +1057,16 @@ AllocateObjectBufferWithInit(JSContext* 
             return; \
         break;
 JS_FOR_EACH_TYPED_ARRAY(CREATE_TYPED_ARRAY)
 #undef CREATE_TYPED_ARRAY
       default:
         MOZ_CRASH("Unsupported TypedArray type");
     }
 
-    // Prevent an overflow caused by the JS_ROUNDUP since |allocateBuffer|
-    // converts |nbytes| of type size_t to uint32_t. The value for |nbytes| will
-    // truncate to zero when |new Int32Array(2147483647)| is used.
-    if (nbytes >= TypedArrayObject::SINGLETON_BYTE_LENGTH)
-        return;
-
     nbytes = JS_ROUNDUP(nbytes, sizeof(Value));
     Nursery& nursery = cx->runtime()->gc.nursery;
     void* buf = nursery.allocateBuffer(obj, nbytes);
     if (buf) {
         obj->initPrivate(buf);
         memset(buf, 0, nbytes);
     }
 }