mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-13 21:35:39 +00:00
Bug 1089609 - Fix findReferences-01.js regressed by recent changes to storage of getters and setters. r=jandem.
--HG-- extra : rebase_source : a6019afb7c1ec098eb9e9ac3394cd01ec41119d3
This commit is contained in:
parent
609d251f10
commit
9a4fbfb926
@ -22,22 +22,22 @@ if (typeof findReferences == "function") {
|
||||
function g() { return 42; }
|
||||
function s(v) { }
|
||||
var p = Object.defineProperty({}, 'a', { get:g, set:s });
|
||||
assertEq(referencesVia(p, 'shape; base; getter', g), true);
|
||||
assertEq(referencesVia(p, 'shape; base; setter', s), true);
|
||||
assertEq(referencesVia(p, 'shape; getter', g), true);
|
||||
assertEq(referencesVia(p, 'shape; setter', s), true);
|
||||
|
||||
// If there are multiple objects with the same shape referring to a getter
|
||||
// or setter, findReferences should get all of them, even though the shape
|
||||
// gets 'marked' the first time we visit it.
|
||||
var q = Object.defineProperty({}, 'a', { get:g, set:s });
|
||||
assertEq(referencesVia(p, 'shape; base; getter', g), true);
|
||||
assertEq(referencesVia(q, 'shape; base; getter', g), true);
|
||||
assertEq(referencesVia(p, 'shape; getter', g), true);
|
||||
assertEq(referencesVia(q, 'shape; getter', g), true);
|
||||
|
||||
// If we extend each object's shape chain, both should still be able to
|
||||
// reach the getter, even though the two shapes are each traversed twice.
|
||||
p.b = 9;
|
||||
q.b = 9;
|
||||
assertEq(referencesVia(p, 'shape; parent; base; getter', g), true);
|
||||
assertEq(referencesVia(q, 'shape; parent; base; getter', g), true);
|
||||
assertEq(referencesVia(p, 'shape; parent; getter', g), true);
|
||||
assertEq(referencesVia(q, 'shape; parent; getter', g), true);
|
||||
|
||||
// These are really just ordinary own property references.
|
||||
assertEq(referencesVia(C, 'prototype', Object.getPrototypeOf(o)), true);
|
||||
|
Loading…
Reference in New Issue
Block a user