1// Copyright 2015 the V8 project authors. All rights reserved. 2// Use of this source code is governed by a BSD-style license that can be 3// found in the LICENSE file. 4 5// Flags: --allow-natives-syntax --expose-gc 6 7function Inner() { 8 this.inner_name = "inner"; 9} 10 11function Boom() { 12 this.boom = "boom"; 13} 14 15function Outer() { 16 this.outer_name = "outer"; 17} 18 19function SetInner(inner, value) { 20 inner.prop = value; 21} 22 23function SetOuter(outer, value) { 24 outer.inner = value; 25} 26 27var inner1 = new Inner(); 28var inner2 = new Inner(); 29 30SetInner(inner1, 10); 31SetInner(inner2, 10); 32 33var outer1 = new Outer(); 34var outer2 = new Outer(); 35var outer3 = new Outer(); 36 37SetOuter(outer1, inner1); 38SetOuter(outer1, inner1); 39SetOuter(outer1, inner1); 40 41SetOuter(outer2, inner2); 42SetOuter(outer2, inner2); 43SetOuter(outer2, inner2); 44 45SetOuter(outer3, inner2); 46SetOuter(outer3, inner2); 47SetOuter(outer3, inner2); 48 49 50SetInner(inner2, 6.5); 51 52outer1 = null; 53inner1 = null; 54 55gc(); 56 57var boom = new Boom(); 58SetOuter(outer2, boom); 59 60gc(); 61