forked from mirrors/gecko-dev
		
	 ecab54a7c9
			
		
	
	
		ecab54a7c9
		
	
	
	
	
		
			
			MozReview-Commit-ID: 7E7LPorrEje --HG-- extra : rebase_source : 0572a35415a766a3f31d266760ecd07f0dcc3f72
		
			
				
	
	
		
			32 lines
		
	
	
	
		
			906 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			32 lines
		
	
	
	
		
			906 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| /* Any copyright is dedicated to the Public Domain.
 | |
|  * http://creativecommons.org/publicdomain/zero/1.0/ */
 | |
| 
 | |
| function log(text) {
 | |
|   dump("WORKER " + text + "\n");
 | |
| }
 | |
| 
 | |
| function send(message) {
 | |
|   self.postMessage(message);
 | |
| }
 | |
| 
 | |
| function finish() {
 | |
|   send({kind: "finish"});
 | |
| }
 | |
| 
 | |
| function ok(condition, description) {
 | |
|   send({kind: "ok", condition: !!condition, description: "" + description});
 | |
| }
 | |
| 
 | |
| function is(a, b, description) {
 | |
|   let outcome = a == b; // Need to decide outcome here, as not everything can be serialized
 | |
|   send({kind: "is", outcome, description: "" + description, a: "" + a, b: "" + b});
 | |
| }
 | |
| 
 | |
| function isnot(a, b, description) {
 | |
|   let outcome = a != b; // Need to decide outcome here, as not everything can be serialized
 | |
|   send({kind: "isnot", outcome, description: "" + description, a: "" + a, b: "" + b});
 | |
| }
 | |
| 
 | |
| function info(description) {
 | |
|   send({kind: "info", description: "" + description});
 | |
| }
 |