node/deps/v8/test/mjsunit/regress/regress-crbug-599003.js
Ali Ijaz Sheikh 52af5c4eeb deps: upgrade V8 to 5.0.71.32
* Pick up the branch head for V8 5.0 stable [1]
* Edit v8 gitignore to allow trace_event copy
* Update V8 DEP trace_event as per deps/v8/DEPS [2]

[1] https://chromium.googlesource.com/v8/v8.git/+/3c67831
[2] 4b09207e44

Ref: https://github.com/nodejs/node/pull/5945
PR-URL: https://github.com/nodejs/node/pull/6111
Reviewed-By: targos - Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: indutny - Fedor Indutny <fedor.indutny@gmail.com>
2016-04-14 10:03:39 -07:00

40 lines
621 B
JavaScript

// Copyright 2016 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax --expose-gc --verify-heap
function A() {}
function g1() {
var obj = new A();
obj.v0 = 0;
obj.v1 = 0;
obj.v2 = 0;
obj.v3 = 0;
obj.v4 = 0;
obj.v5 = 0;
obj.v6 = 0;
obj.v7 = 0;
obj.v8 = 0;
obj.v9 = 0;
return obj;
}
function g2() {
return new A();
}
var o = g1();
%OptimizeFunctionOnNextCall(g2);
g2();
o = null;
gc();
for (var i = 0; i < 20; i++) {
var o = new A();
}
g2();
gc(); // Boom!