mrowe@apple.com | 2f6dfdf | 2008-05-22 01:20:45 +0000 | [diff] [blame] | 1 | This test ensure that global-to-global re-entry works correctly and does not clobber anything. This passes if it does not crash. |
2 | <script> | ||||
rniwa@webkit.org | 03b9c6d | 2012-07-16 01:41:53 +0000 | [diff] [blame] | 3 | if (this.testRunner) |
4 | testRunner.dumpAsText(); | ||||
mrowe@apple.com | 2f6dfdf | 2008-05-22 01:20:45 +0000 | [diff] [blame] | 5 | try { |
6 | // The important part of the test is the global reentry from the document.write passed implicitly to eval | ||||
7 | // the rest is just to ensure the test crahes reliably (errr... or something) if something goes wrong with | ||||
8 | // the reentry. | ||||
9 | __defineSetter__("implicitCall", eval); | ||||
10 | var a; | ||||
11 | a.b = (implicitCall = 'document.write("<script>var b, c, d, e, f, g, h, i, j, k, l, m, n, o, p;</"+"script>");'); | ||||
12 | a = a.b; | ||||
13 | throw ""; | ||||
14 | } catch(e) { | ||||
15 | } | ||||
16 | </script> |