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

Side by Side Diff: test/mjsunit/regress/regress-crbug-571517.js

Issue 1559323002: [prototype user tracking] Don't skip JSGlobalProxies (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 11 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 | « src/objects.cc ('k') | 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 function Receiver() { this.receiver = "receiver"; }
6 function Proto() { this.proto = "proto"; }
7
8 function f(a) {
9 return a.foo;
10 }
11
12 var rec = new Receiver();
13
14 var proto = rec.__proto__.__proto__;
15
16 // Initialize prototype chain dependent IC (nonexistent load).
17 assertEquals(undefined, f(rec));
18 assertEquals(undefined, f(rec));
19
20 // Add a new prototype to the end of the chain.
21 var p2 = new Proto();
22 p2.__proto__ = null;
23 proto.__proto__ = p2;
24
25 // Update the IC.
26 assertEquals(undefined, f(rec));
27
28 // Now modify the most recently added prototype by adding a property...
29 p2.foo = "bar";
30 assertEquals("bar", f(rec));
31
32 // ...and removing it again. Due to missing prototype user registrations,
33 // this fails to invalidate the IC.
34 delete p2.foo;
35 p2.secret = "GAME OVER";
36 assertEquals(undefined, f(rec));
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698