< prev index next >

test/script/basic/JDK-8134569.js

Print this page

        

*** 60,128 **** } C.prototype = new D(); return new C(); } function createEval() { return eval("Object.create({})"); } function p(o) { print(o.x) } ! var a, b; create(); a = create(); b = create(); a.__proto__.x = 123; p(a); p(b); a = create(); b = create(); b.__proto__.x = 123; p(a); p(b); a = createEmpty(); b = createEmpty(); a.__proto__.x = 123; p(a); p(b); a = createEmpty(); b = createEmpty(); b.__proto__.x = 123; p(a); p(b); a = createDeep(); b = createDeep(); a.__proto__.__proto__.x = 123; p(a); p(b); a = createDeep(); b = createDeep(); b.__proto__.__proto__.x = 123; p(a); p(b); a = createEval(); b = createEval(); a.__proto__.x = 123; p(a); p(b); a = createEval(); b = createEval(); b.__proto__.x = 123; p(a); p(b); --- 60,207 ---- } C.prototype = new D(); return new C(); } + function createDeeper() { + function C() { + this.i1 = 1; + this.i2 = 2; + this.i3 = 3; + return this; + } + function D() { + this.p1 = 1; + this.p2 = 2; + this.p3 = 3; + return this; + } + function E() { + this.e1 = 1; + this.e2 = 2; + this.e3 = 3; + return this; + } + D.prototype = new E(); + C.prototype = new D(); + return new C(); + } + function createEval() { return eval("Object.create({})"); } function p(o) { print(o.x) } ! function e(o) { print(o.e1) } ! ! var a, b, c; create(); a = create(); b = create(); + c = create(); a.__proto__.x = 123; p(a); p(b); + p(c); a = create(); b = create(); + c = create(); b.__proto__.x = 123; p(a); p(b); + p(c); a = createEmpty(); b = createEmpty(); + c = createEmpty(); a.__proto__.x = 123; p(a); p(b); + p(c); a = createEmpty(); b = createEmpty(); + c = createEmpty(); b.__proto__.x = 123; p(a); p(b); + p(c); a = createDeep(); b = createDeep(); + c = createDeep(); a.__proto__.__proto__.x = 123; p(a); p(b); + p(c); a = createDeep(); b = createDeep(); + c = createDeep(); b.__proto__.__proto__.x = 123; p(a); p(b); + p(c); + + a = createDeeper(); + b = createDeeper(); + c = createDeeper(); + a.__proto__.__proto__.__proto__.x = 123; + + p(a); + p(b); + p(c); + + a = createDeeper(); + b = createDeeper(); + c = createDeeper(); + b.__proto__.__proto__.__proto__.x = 123; + + p(a); + p(b); + p(c); + + a = createDeeper(); + b = createDeeper(); + c = createDeeper(); + a.__proto__.__proto__ = null; + + e(a); + e(b); + e(c); + + a = createDeeper(); + b = createDeeper(); + c = createDeeper(); + b.__proto__.__proto__ = null; + + e(a); + e(b); + e(c); + a = createEval(); b = createEval(); + c = createEval(); a.__proto__.x = 123; p(a); p(b); + p(c); a = createEval(); b = createEval(); + c = createEval(); b.__proto__.x = 123; p(a); p(b); + p(c);
< prev index next >