Index: test/mjsunit/d8-worker.js |
diff --git a/test/mjsunit/d8-worker.js b/test/mjsunit/d8-worker.js |
index 807791717e1f6f7f047a9cc718468ad4f138a176..ef02ca5b405815ca5252886b4cfe46d4ead4dfbc 100644 |
--- a/test/mjsunit/d8-worker.js |
+++ b/test/mjsunit/d8-worker.js |
@@ -128,4 +128,12 @@ if (this.Worker) { |
assertEquals("DONE", w.getMessage()); |
w.terminate(); |
+ |
+ |
+ // Make sure that the main thread doesn't block forever in getMessage() if |
+ // the worker dies without posting a message. |
+ function f2() {} |
+ var w2 = new Worker(f2); |
+ var msg = w2.getMessage(); |
+ assertEquals(undefined, msg); |
} |