Closed
Bug 978238
Opened 10 years ago
Closed 10 years ago
ES6 Proxies: [[GetOwnProperty]] is in the weeds
Categories
(Core :: JavaScript: Standard Library, defect)
Core
JavaScript: Standard Library
Tracking
()
RESOLVED
FIXED
mozilla32
People
(Reporter: efaust, Assigned: efaust)
References
Details
(Whiteboard: [js:p1])
Attachments
(2 files)
4.14 KB,
patch
|
jorendorff
:
review+
|
Details | Diff | Splinter Review |
15.25 KB,
patch
|
jorendorff
:
review+
|
Details | Diff | Splinter Review |
Similar to [[DefineProperty]], this was carefully written to a different specification. Also needs a detailed look.
Updated•10 years ago
|
Component: JavaScript Engine → JavaScript: Standard Library
OS: Linux → All
Hardware: x86_64 → All
Whiteboard: [js:p1]
Assignee | ||
Comment 1•10 years ago
|
||
add PropDesc::populatePropertyDescriptor(), as well as ensuring that undefined PropertyDescritors convert to undefined PropDescs.
Assignee | ||
Comment 2•10 years ago
|
||
Attachment #8418991 -
Flags: review?(jorendorff)
Comment 3•10 years ago
|
||
Comment on attachment 8418988 [details] [diff] [review] Part 0: Clean up PropDesc<->PropertyDescriptor Conversions Review of attachment 8418988 [details] [diff] [review]: ----------------------------------------------------------------- r=me ::: js/src/jsobj.cpp @@ +153,5 @@ > { > MOZ_ASSERT(isUndefined()); > > + if (!desc.object()) > + return; ...huh. I'll be happier when we use Maybe for this case, but until then, we can just MOZ_ASSERT(desc.isUndefined()) and MOZ_ASSERT(!desc.isUndefined()) all over the place... @@ +197,5 @@ > + desc.setGetter(getter()); > + desc.setSetter(setter()); > + desc.setAttributes(attributes()); > + desc.object().set(obj); > +} Oh, great! I just wrote this method, but worse, in a patch over in bug 1008441 that hasn't landed yet.
Attachment #8418988 -
Flags: review?(jorendorff) → review+
Comment 4•10 years ago
|
||
(The reason I feel a little funny about that "if (!desc.object()) return;" is that I suspect sometimes in actual use, PropertyDescriptor::object is nullptr-because-we-don't-care-about-that rather than nullptr-because-a-lookup-found-nothing. For example, when defining, maybe? In any case, obviously that isn't happening in places where we convert to PropDesc.)
Comment 5•10 years ago
|
||
Comment on attachment 8418991 [details] [diff] [review] Re-implement [[GetOwnProperty]] Review of attachment 8418991 [details] [diff] [review]: ----------------------------------------------------------------- Are there other tests that should be added here? ::: js/src/jsproxy.cpp @@ +1582,5 @@ > + return true; > + } > + > + // substep b > + if (targetDesc.isPermanent()) { Please add an isConfigurable() method that returns !isPermanent() and use it here.
Attachment #8418991 -
Flags: review?(jorendorff) → review+
Comment 6•10 years ago
|
||
Please land this!
Assignee | ||
Comment 7•10 years ago
|
||
remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/c25abea181d7 remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/ea412568c4be
Comment 8•10 years ago
|
||
Backed out for crashes during Linux64 debug build packaging. https://hg.mozilla.org/integration/mozilla-inbound/rev/51dd4f1ba186 https://tbpl.mozilla.org/php/getParsedLog.php?id=40982075&tree=Mozilla-Inbound
Assignee | ||
Comment 9•10 years ago
|
||
remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/0d4e738415f6 remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/17f1c024a18d
Comment 10•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/0d4e738415f6 https://hg.mozilla.org/mozilla-central/rev/17f1c024a18d
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla32
You need to log in
before you can comment on or make changes to this bug.
Description
•