Index: test/mjsunit/d8-worker.js |
diff --git a/test/mjsunit/d8-worker.js b/test/mjsunit/d8-worker.js |
index f172fb160338338476473503e54514cb1a994bde..140cf3ccd89e51e5ace073e6bdfb0fec0a9cf67a 100644 |
--- a/test/mjsunit/d8-worker.js |
+++ b/test/mjsunit/d8-worker.js |
@@ -61,8 +61,8 @@ var workerScript = |
} |
break; |
case 7: |
- if (JSON.stringify(m) !== \"{'a':1,'b':2.5,'c':'three'}\") |
- throw new Error('Object'); |
+ if (JSON.stringify(m) !== '{"a":1,"b":2.5,"c":"three"}') |
+ throw new Error('Object' + JSON.stringify(m)); |
break; |
case 8: |
var ab = m; |
@@ -88,7 +88,6 @@ var workerScript = |
} |
};`; |
- |
if (this.Worker) { |
function createArrayBuffer(byteLength) { |
var ab = new ArrayBuffer(byteLength); |
@@ -111,6 +110,17 @@ if (this.Worker) { |
w.postMessage([4, true, "bye"]); |
w.postMessage({a: 1, b: 2.5, c: "three"}); |
+ // Test bad get in transfer list. |
+ var transferList = [undefined]; |
+ Object.defineProperty(transferList, '0', { |
+ get: function() { |
+ throw 'unexpected!'; |
+ } |
+ }); |
+ assertThrows(function() { |
+ w.postMessage([], transferList); |
+ }); |
+ |
// Clone ArrayBuffer |
var ab1 = createArrayBuffer(16); |
w.postMessage(ab1); |