Closed Bug 1163423 Opened 5 years ago Closed 5 years ago
_Has Own Property
We already have JS_AlreayHasOwnProperty, but that function doesn't call resolve hooks. Maybe worth looking into if we can remove it.
Attachment #8603865 - Flags: review?(bhackett1024)
Assignee: nobody → evilpies
Status: NEW → ASSIGNED
Attachment #8603866 - Flags: review?(wmccloskey)
Attachment #8603865 - Flags: review?(bhackett1024) → review+
> Maybe worth looking into if we can remove it. So looking at consumers of JS_AlreadyHasOwnProperty(ById): 1) DOMProxyShadows is using it on the expando, so could use JS_HasOwnPropertyById. Assuming that's not slower, of course. 2) In DefineConstructor, I'm not exactly sure why we need that check. It might be possible to remove it, if we know that the global's resolve hook will always resolve the relevant properties before someone has a chance to redefine them. 3) Plugin code, no idea. But those objects _do_ have resolve hooks, so need to check carefully. 4) XBL, pretty sure is working on objects with no resolve hooks only. 5) Xrays, working with holder objects, which have no resolve hook.
Attachment #8603866 - Flags: review?(wmccloskey) → review+
You need to log in before you can comment on or make changes to this bug.