Thu, 15 Jan 2015 21:03:48 +0100
Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)
1 /* Any copyright is dedicated to the Public Domain.
2 * http://creativecommons.org/publicdomain/zero/1.0/ */
4 function log(text) {
5 dump("WORKER " + text + "\n");
6 }
8 function send(message) {
9 self.postMessage(message);
10 }
12 function finish() {
13 send({kind: "finish"});
14 }
16 function ok(condition, description) {
17 send({kind: "ok", condition: !!condition, description: "" + description});
18 }
20 function is(a, b, description) {
21 let outcome = a == b; // Need to decide outcome here, as not everything can be serialized
22 send({kind: "is", outcome: outcome, description: "" + description, a: "" + a, b: "" + b});
23 }
25 function isnot(a, b, description) {
26 let outcome = a != b; // Need to decide outcome here, as not everything can be serialized
27 send({kind: "isnot", outcome: outcome, description: "" + description, a: "" + a, b: "" + b});
28 }
30 function info(description) {
31 send({kind: "info", description: "" + description});
32 }