diff options
Diffstat (limited to 'dom/workers/test/WorkerDebugger_sharedWorker.js')
-rw-r--r-- | dom/workers/test/WorkerDebugger_sharedWorker.js | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/dom/workers/test/WorkerDebugger_sharedWorker.js b/dom/workers/test/WorkerDebugger_sharedWorker.js new file mode 100644 index 0000000000..30dfa33405 --- /dev/null +++ b/dom/workers/test/WorkerDebugger_sharedWorker.js @@ -0,0 +1,17 @@ +"use strict"; + +self.onconnect = function(event) { + event.ports[0].onmessage = function(e) { + switch (e.data) { + case "close": + close(); + break; + + case "close_loop": + close(); + // Let's loop forever. + while (1) {} + break; + } + }; +}; |