summaryrefslogtreecommitdiffstats
path: root/dom/workers/test/WorkerDebuggerGlobalScope.enterEventLoop_worker.js
diff options
context:
space:
mode:
Diffstat (limited to 'dom/workers/test/WorkerDebuggerGlobalScope.enterEventLoop_worker.js')
-rw-r--r--dom/workers/test/WorkerDebuggerGlobalScope.enterEventLoop_worker.js27
1 files changed, 27 insertions, 0 deletions
diff --git a/dom/workers/test/WorkerDebuggerGlobalScope.enterEventLoop_worker.js b/dom/workers/test/WorkerDebuggerGlobalScope.enterEventLoop_worker.js
new file mode 100644
index 0000000000..8108a20289
--- /dev/null
+++ b/dom/workers/test/WorkerDebuggerGlobalScope.enterEventLoop_worker.js
@@ -0,0 +1,27 @@
+"use strict";
+
+function f() {
+ debugger;
+}
+
+var worker = new Worker(
+ "WorkerDebuggerGlobalScope.enterEventLoop_childWorker.js"
+);
+
+worker.onmessage = function (event) {
+ postMessage("child:" + event.data);
+};
+
+self.onmessage = function (event) {
+ var message = event.data;
+ if (message.includes(":")) {
+ worker.postMessage(message.split(":")[1]);
+ return;
+ }
+ switch (message) {
+ case "ping":
+ debugger;
+ postMessage("pong");
+ break;
+ }
+};