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 from inlined code." | 2 "Tests that DFG custom getter caching does not break the world if the getter thr
ows an exception from inlined code." |
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 baz(x) { | 9 function baz(x) { |
10 return foo(x); | 10 return foo(x); |
11 } | 11 } |
12 | 12 |
13 function bar(binary) { | 13 function bar(binary) { |
14 var x = new XMLHttpRequest(); | 14 var x = new XMLHttpRequest(); |
15 x.open("GET", "http://foo.bar.com/"); | 15 x.open("GET", "http://foo.bar.com/"); |
16 if (binary) | 16 if (binary) |
17 x.responseType = "arraybuffer"; | 17 x.responseType = "arraybuffer"; |
18 try { | 18 try { |
19 return "Returned result: " + baz(x); | 19 return "Returned result: " + baz(x); |
20 } catch (e) { | 20 } catch (e) { |
21 return "Threw exception: " + e; | 21 return "Threw exception: " + e; |
22 } | 22 } |
23 } | 23 } |
24 | 24 |
25 for (var i = 0; i < 200; ++i) { | 25 for (var i = 0; i < 200; ++i) { |
26 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: \""); | 26 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: \""); |
27 } | 27 } |
28 | 28 |
29 | 29 |
OLD | NEW |