mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 10:00:54 +00:00
Bug 1363959 - Compare jsid equality instead of string comparison in XrayResolveOwnProperty(). r=bholley
MozReview-Commit-ID: LFK5hR2RBGF --HG-- extra : rebase_source : 1aa34b9998840302574f23c00d15ec713f70dcde
This commit is contained in:
parent
5258e1e147
commit
a4c77b8ab9
@ -1741,7 +1741,7 @@ XrayResolveOwnProperty(JSContext* cx, JS::Handle<JSObject*> wrapper,
|
||||
return true;
|
||||
}
|
||||
} else if (type == eInterface) {
|
||||
if (IdEquals(id, "prototype")) {
|
||||
if (id == GetJSIDByIndex(cx, XPCJSContext::IDX_PROTOTYPE)) {
|
||||
return nativePropertyHooks->mPrototypeID == prototypes::id::_ID_Count ||
|
||||
ResolvePrototypeOrConstructor(cx, wrapper, obj,
|
||||
nativePropertyHooks->mPrototypeID,
|
||||
@ -1771,7 +1771,7 @@ XrayResolveOwnProperty(JSContext* cx, JS::Handle<JSObject*> wrapper,
|
||||
} else {
|
||||
MOZ_ASSERT(IsInterfacePrototype(type));
|
||||
|
||||
if (IdEquals(id, "constructor")) {
|
||||
if (id == GetJSIDByIndex(cx, XPCJSContext::IDX_CONSTRUCTOR)) {
|
||||
return nativePropertyHooks->mConstructorID == constructors::id::_ID_Count ||
|
||||
ResolvePrototypeOrConstructor(cx, wrapper, obj,
|
||||
nativePropertyHooks->mConstructorID,
|
||||
|
Loading…
Reference in New Issue
Block a user