Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / js / regress / script-tests / get-by-id-chain-from-try-block.js
blob475083f74117ee810452b5829e4c31ae6a71749f
1 function A() { }
3 A.prototype = {f:42};
5 function B() { }
7 B.prototype = new A();
9 function C() { }
11 C.prototype = new B();
13 function D() { }
15 D.prototype = new C();
17 function E() { }
19 E.prototype = new D();
21 function F() { }
23 F.prototype = new E();
25 function G() { }
27 G.prototype = new F();
29 function foo(o) {
30 try {
31 var result = 0;
32 for (var i = 0; i < 1000; ++i)
33 result += o.f;
34 return result;
35 } catch (e) {
36 return 52;
40 var result = 0;
42 for (var i = 0; i < 1000; ++i)
43 result += foo(new G());
45 if (result != 42000000)
46 throw "Error: bad result: " + result;