Status: Accepted
Owner: [email protected]
CC: [email protected]
Labels: Type-Bug Priority-Medium
New issue 2163 by [email protected]: ClearNonLiveTransitions throws
away non-stale accessor-pairs
http://code.google.com/p/v8/issues/detail?id=2163
ClearBackPointer ignores all non-map values, while keeping live maps. If we
construct an accessor pair that contains both a JSFunction (eg getter) and
a second non-live-map-value (JSFunction or stale map), the accessor pair
will be thrown away. Objects still using this map will lose their accessors.
// Flags: --fast-accessor-properties --expose-gc
// Handy abbreviations.
var dp = Object.defineProperty;
var gop = Object.getOwnPropertyDescriptor;
function getter() { return 111; }
function setter(x) { print(222); }
function anotherGetter() { return 333; }
function anotherSetter(x) { print(444); }
var obj1, obj2;
// Two objects with the same getter.
obj1 = {};
dp(obj1, "alpha", { get: getter, set: setter });
obj2 = {}
dp(obj2, "alpha", { get: getter });
obj1 = {};
assertEquals(111, obj2.alpha);
gc();
assertEquals(111, obj2.alpha);
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev