Index: test/mjsunit/harmony/symbols.js |
diff --git a/test/mjsunit/harmony/symbols.js b/test/mjsunit/harmony/symbols.js |
index c2002e6ac7298a24fa46d70a1ba57f06177d3905..fe0a450832010ae04e5fccbc159fc0903348ba29 100644 |
--- a/test/mjsunit/harmony/symbols.js |
+++ b/test/mjsunit/harmony/symbols.js |
@@ -301,3 +301,19 @@ for (var i in objs) { |
TestKeyDescriptor(obj) |
TestKeyDelete(obj) |
} |
+ |
+ |
+function TestCachedKeyAfterScavenge() { |
+ gc(); |
+ // Keyed property lookup are cached. Hereby we assume that the keys are |
+ // tenured, so that we only have to clear the cache between mark compacts, |
+ // but not between scavenges. This must also apply for symbol keys. |
+ var key = Symbol("key"); |
+ var a = {}; |
+ a[key] = "abc"; |
+ |
+ for (var i = 0; i < 1000000; i++) { |
+ a[key] += "a"; // Allocations cause a scavenge. |
+ } |
+} |
+TestCachedKeyAfterScavenge(); |