| OLD | NEW |
| 1 description( | 1 description( |
| 2 "Tests that DFG custom getter caching does not break the world if the getter thr
ows an exception." | 2 "Tests that DFG custom getter caching does not break the world if the getter thr
ows an exception." |
| 3 ); | 3 ); |
| 4 | 4 |
| 5 function foo(x) { | 5 function foo(x) { |
| 6 return x.responseText; | 6 return x.responseText; |
| 7 } | 7 } |
| 8 | 8 |
| 9 function bar(binary) { | 9 function bar(binary) { |
| 10 var x = new XMLHttpRequest(); | 10 var x = new XMLHttpRequest(); |
| 11 x.open("GET", "http://foo.bar.com/"); | 11 x.open("GET", "http://foo.bar.com/"); |
| 12 if (binary) | 12 if (binary) |
| 13 x.responseType = "arraybuffer"; | 13 x.responseType = "arraybuffer"; |
| 14 try { | 14 try { |
| 15 return "Returned result: " + foo(x); | 15 return "Returned result: " + foo(x); |
| 16 } catch (e) { | 16 } catch (e) { |
| 17 return "Threw exception: " + e; | 17 return "Threw exception: " + e; |
| 18 } | 18 } |
| 19 } | 19 } |
| 20 | 20 |
| 21 for (var i = 0; i < 200; ++i) { | 21 for (var i = 0; i < 200; ++i) { |
| 22 shouldBe("bar(i >= 100)", i >= 100 ? "\"Threw exception: InvalidStateError:
Failed to read the 'responseText' property from 'XMLHttpRequest': the value is o
nly accessible if the object's 'responseType' is '' or 'text' (was 'arraybuffer'
).\"" : "\"Returned result: \""); | 22 shouldBe("bar(i >= 100)", i >= 100 ? "\"Threw exception: InvalidStateError:
Failed to read the 'responseText' property from 'XMLHttpRequest': The value is o
nly accessible if the object's 'responseType' is '' or 'text' (was 'arraybuffer'
).\"" : "\"Returned result: \""); |
| 23 } | 23 } |
| 24 | 24 |
| 25 | 25 |
| OLD | NEW |