| OLD | NEW |
| 1 description( | 1 description( |
| 2 "This test checks that implicit reentry to global code through a getter does not
clobber the calling register file." | 2 "This test checks that implicit reentry to global code through a getter does not
clobber the calling register file." |
| 3 ); | 3 ); |
| 4 | 4 |
| 5 var testVar = "FAIL"; | 5 var testVar = "FAIL"; |
| 6 function testGlobalCode(test) { | 6 function testGlobalCode(test) { |
| 7 document.write("<script>"+test+"<"+"/script>"); | 7 document.write("<script>"+test+"<"+"/script>"); |
| 8 } | 8 } |
| 9 var testObject = { | 9 var testObject = { |
| 10 get getterTest(){ testGlobalCode("var a, b, c, d; testVar = 'PASS';"); }, | 10 get getterTest(){ testGlobalCode("var a, b, c, d; testVar = 'PASS';"); }, |
| 11 set setterTest(){ testGlobalCode("var e, f, g, h; testVar = 'PASS';"); }, | 11 set setterTest(_){ testGlobalCode("var e, f, g, h; testVar = 'PASS';"); }, |
| 12 toString: function() { testGlobalCode("var i, j, k, l; testVar = 'PASS';");
return ''; }, | 12 toString: function() { testGlobalCode("var i, j, k, l; testVar = 'PASS';");
return ''; }, |
| 13 valueOf: function() { testGlobalCode("var m, n, o, p; testVar = 'PASS';"); r
eturn 0; }, | 13 valueOf: function() { testGlobalCode("var m, n, o, p; testVar = 'PASS';"); r
eturn 0; }, |
| 14 toStringTest: function() { "" + this; }, | 14 toStringTest: function() { "" + this; }, |
| 15 valueOfTest: function() { 0 * this; } | 15 valueOfTest: function() { 0 * this; } |
| 16 }; | 16 }; |
| 17 | 17 |
| 18 shouldBe("testObject.getterTest; testVar;", '"PASS"'); | 18 shouldBe("testObject.getterTest; testVar;", '"PASS"'); |
| 19 var testVar = "FAIL"; | 19 var testVar = "FAIL"; |
| 20 shouldBe("testObject.setterTest = 1; testVar;", '"PASS"'); | 20 shouldBe("testObject.setterTest = 1; testVar;", '"PASS"'); |
| 21 var testVar = "FAIL"; | 21 var testVar = "FAIL"; |
| 22 shouldBe("testObject.toStringTest(); testVar;", '"PASS"'); | 22 shouldBe("testObject.toStringTest(); testVar;", '"PASS"'); |
| 23 var testVar = "FAIL"; | 23 var testVar = "FAIL"; |
| 24 shouldBe("testObject.valueOfTest(); testVar;", '"PASS"'); | 24 shouldBe("testObject.valueOfTest(); testVar;", '"PASS"'); |
| OLD | NEW |