Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(239)

Side by Side Diff: test/mjsunit/regress/regress-3969.js

Issue 1019223002: Add regression test for dependency to field type tracked weak map. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
6
7 function Inner() {
8 this.property = "OK";
9 this.o2 = 1;
10 }
11
12 function Outer(inner) {
13 this.inner = inner;
14 }
15
16 var inner = new Inner();
17 var outer = new Outer(inner);
18
19 Outer.prototype.boom = function() {
20 return this.inner.property;
21 }
22
23 assertEquals("OK", outer.boom());
24 assertEquals("OK", outer.boom());
25 %OptimizeFunctionOnNextCall(Outer.prototype.boom);
26 assertEquals("OK", outer.boom());
27
28 inner = undefined;
29 %SetAllocationTimeout(0 /*interval*/, 2 /*timeout*/);
30 // Call something that will do GC while holding a handle to outer's map.
31 // The key is that this lets inner's map die while keeping outer's map alive.
32 delete outer.inner;
33
34 outer = new Outer({field: 1.51, property: "OK"});
35
36 assertEquals("OK", outer.boom());
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698