зеркало из https://github.com/mozilla/gecko-dev.git
Bug 604476 - Do a full property resolve when enumerating. r=gal
--HG-- extra : rebase_source : be6ee618aebfed864e737d341208e854061671ee
This commit is contained in:
Родитель
7f28a03fff
Коммит
84dcc4af5f
|
@ -52,6 +52,13 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=500931
|
|||
"this is wrapped correctly");
|
||||
SimpleTest.finish();
|
||||
}, 0)
|
||||
|
||||
var saw0 = false;
|
||||
for (let i in $('ifr').contentDocument.getElementsByTagName('body')) {
|
||||
if (i === "0")
|
||||
saw0 = true;
|
||||
}
|
||||
ok(saw0, "properly enumerated the 0 value");
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
|
|
@ -739,10 +739,10 @@ XrayWrapper<Base, Policy>::enumerate(JSContext *cx, JSObject *wrapper, js::AutoI
|
|||
// Go through the properties we got and enumerate all native ones.
|
||||
for (size_t n = 0; n < wnProps.length(); ++n) {
|
||||
jsid id = wnProps[n];
|
||||
JSPropertyDescriptor dummy;
|
||||
if (!ResolveNativeProperty(cx, wrapper, holder, id, false, &dummy))
|
||||
JSBool hasProp;
|
||||
if (!JS_HasPropertyById(cx, wrapper, id, &hasProp))
|
||||
return false;
|
||||
if (dummy.obj)
|
||||
if (hasProp)
|
||||
props.append(id);
|
||||
}
|
||||
return true;
|
||||
|
|
Загрузка…
Ссылка в новой задаче