Index: test/mjsunit/regress/regress-2529.js |
diff --git a/test/mjsunit/d8-worker-spawn-worker.js b/test/mjsunit/regress/regress-2529.js |
similarity index 78% |
copy from test/mjsunit/d8-worker-spawn-worker.js |
copy to test/mjsunit/regress/regress-2529.js |
index a114d8587e0ebc7095565cfebb3634e7fdefbbe7..cec56a60f51bbca1db930963205563fe23e1434b 100644 |
--- a/test/mjsunit/d8-worker-spawn-worker.js |
+++ b/test/mjsunit/regress/regress-2529.js |
@@ -25,16 +25,19 @@ |
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
-if (this.Worker) { |
- var workerScript = |
- `var w = new Worker('postMessage(42)'); |
- onmessage = function(parentMsg) { |
- w.postMessage(parentMsg); |
- var childMsg = w.getMessage(); |
- postMessage(childMsg); |
- };`; |
- var w = new Worker(workerScript); |
- w.postMessage(9); |
- assertEquals(42, w.getMessage()); |
+// Regression test for v8 bug 2529. |
+ |
+function makeScript(s) { |
+ return 'while(true) { try { "try"; break } finally { "finally" }; ' + s + ' }'; |
} |
+ |
+var s1 = makeScript(''); |
+var s2 = makeScript('y = "done"'); |
+var s3 = makeScript('if (true) 2; else var x = 3;'); |
+var s4 = makeScript('if (true) 2; else 3;'); |
+ |
+assertEquals("try", eval(s1)); |
+assertEquals("try", eval(s2)); |
+assertEquals("try", eval(s3)); |
+assertEquals("try", eval(s4)); |