Index: test/mjsunit/regress/regress-crbug-514081.js |
diff --git a/test/mjsunit/regress/regress-crbug-514081.js b/test/mjsunit/regress/regress-crbug-514081.js |
index af31f4b9c6ceed6e74e5deea65f03d0b7b12e19b..ee3ed81300dab183fbbb7cef24f70ad2ff12407a 100644 |
--- a/test/mjsunit/regress/regress-crbug-514081.js |
+++ b/test/mjsunit/regress/regress-crbug-514081.js |
@@ -5,16 +5,14 @@ |
if (this.Worker) { |
var __v_7 = new Worker('onmessage = function() {};'); |
var e; |
+ var ab = new ArrayBuffer(2 * 1000 * 1000); |
try { |
- var ab = new ArrayBuffer(2147483648); |
- try { |
- __v_7.postMessage(ab); |
- } catch (e) { |
- // postMessage failed, should be a DataCloneError message. |
- assertContains('cloned', e.message); |
- } |
+ __v_7.postMessage(ab); |
+ threw = false; |
} catch (e) { |
- // Creating the ArrayBuffer failed. |
- assertInstanceof(e, RangeError); |
+ // postMessage failed, should be a DataCloneError message. |
+ assertContains('cloned', e.message); |
+ threw = true; |
} |
+ assertTrue(threw, 'Should throw when trying to serialize large message.'); |
} |