Closed
Bug 1133746
Opened 9 years ago
Closed 9 years ago
Add an option for "property is on expando" to DOMProxyShadowsResult
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
mozilla39
Tracking | Status | |
---|---|---|
firefox39 | --- | fixed |
People
(Reporter: bzbarsky, Assigned: bzbarsky)
References
Details
Attachments
(1 file)
8.46 KB,
patch
|
efaust
:
review+
peterv
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Comment 1•9 years ago
|
||
Attachment #8565509 -
Flags: review?(peterv)
Attachment #8565509 -
Flags: review?(efaustbmo)
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Comment 2•9 years ago
|
||
Comment on attachment 8565509 [details] [diff] [review] Allow DOMProxyShadows to communicate to the JIT whether the shadowing is done by the expando object or not Review of attachment 8565509 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/bindings/DOMJSProxyHandler.cpp @@ +32,5 @@ > > js::DOMProxyShadowsResult > DOMProxyShadows(JSContext* cx, JS::Handle<JSObject*> proxy, JS::Handle<jsid> id) > { > + JS::Rooted<JSObject*> expando(cx, DOMProxyHandler::GetExpandoObject(proxy)); This operation already looks up the expando slot. This is kinda clunky, but I guess better than trying to wrap the isOverrideBuiltins checking logic into GetExpandoObject, since it's presumably not useful to know that at the same time elsewhere? ::: js/src/jsfriendapi.h @@ +1214,5 @@ > uint32_t GetDOMProxyExpandoSlot(); > DOMProxyShadowsCheck GetDOMProxyShadowsCheck(); > +inline bool DOMProxyIsShadowing(DOMProxyShadowsResult result) { > + return result == Shadows || result == ShadowsViaDirectExpando || > + result == ShadowsViaIndirectExpando; nit: Could stand to see nicer indenting here. Perhaps return result == Shadows || result == ShadowsViaDirectExpando || result == ShadowsViaIndirectExpando;
Attachment #8565509 -
Flags: review?(efaustbmo) → review+
Assignee | ||
Comment 3•9 years ago
|
||
> This operation already looks up the expando slot Yeah. I didn't really find a good way to deal with that... > since it's presumably not useful to know that at the same time elsewhere? Pretty much never, in fact. > nit: Could stand to see nicer indenting here. Done.
Comment 4•9 years ago
|
||
Comment on attachment 8565509 [details] [diff] [review] Allow DOMProxyShadows to communicate to the JIT whether the shadowing is done by the expando object or not Review of attachment 8565509 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/bindings/DOMJSProxyHandler.cpp @@ +42,5 @@ > return js::ShadowCheckFailed; > > + if (hasOwn) { > + return isOverrideBuiltins ? > + js::ShadowsViaIndirectExpando : js::ShadowsViaDirectExpando; If an interface has OverrideBuiltins then expandos shouldn't shadow named properties. Doesn't this make them shadow?
Updated•9 years ago
|
Flags: needinfo?(bzbarsky)
Assignee | ||
Comment 5•9 years ago
|
||
> then expandos shouldn't shadow named properties.
That's what the spec says, but it's not what we do right now. Right now expandos shadow in our implementation, and I just preserved the behavior.
Flags: needinfo?(bzbarsky)
Updated•9 years ago
|
Attachment #8565509 -
Flags: review?(peterv) → review+
Assignee | ||
Comment 6•9 years ago
|
||
Posted https://lists.w3.org/Archives/Public/public-script-coord/2015JanMar/0120.html to get the spec sorted out.
Assignee | ||
Comment 7•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/fa4a0af4fbaf
https://hg.mozilla.org/mozilla-central/rev/fa4a0af4fbaf
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox39:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla39
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•