Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
1 /**
2 * Any copyright is dedicated to the Public Domain.
3 * http://creativecommons.org/publicdomain/zero/1.0/
4 */
6 onmessage = function(event) {
7 if ("notEmpty" in event.data && "byteLength" in event.data.notEmpty) {
8 postMessage({ event: "W: NotEmpty object received: " + event.data.notEmpty.byteLength,
9 status: event.data.notEmpty.byteLength != 0, last: false });
10 }
12 var ab = new ArrayBuffer(event.data.size);
13 postMessage({ event: "W: The size is: " + event.data.size + " == " + ab.byteLength,
14 status: ab.byteLength == event.data.size, last: false });
16 postMessage({ event: "W: postMessage with arrayBuffer", status: true,
17 notEmpty: ab, ab: ab, bc: [ ab, ab, { dd: ab } ] }, [ab]);
19 postMessage({ event: "W: The size is: 0 == " + ab.byteLength,
20 status: ab.byteLength == 0, last: false });
22 postMessage({ event: "W: last one!", status: true, last: true });
23 }