Closed Bug 1130537 Opened 5 years ago Closed 5 years ago

Reimplement js::SetPropertyIgnoringNamedGetter to follow ES6 draft rev 32 9.1.9 [[Set]]

Categories

(Core :: JavaScript Engine, defect)

x86_64
Linux
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla39
Tracking Status
firefox39 --- fixed

People

(Reporter: jorendorff, Assigned: jorendorff)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Bug 1083211 fixed BaseProxyHandler::set, but a handful of proxies are using SetPropertyIgnoringNamedGetter which still does not resemble the spec at all.

The behavior should be just like 9.1.9 from step 4 to the end, with ownDesc passed in as an argument.
Assignee: nobody → jorendorff
Status: NEW → ASSIGNED
Comment on attachment 8564262 [details] [diff] [review]
Update js::SetPropertyIgnoringNamedGetter to ES6 idioms

Review of attachment 8564262 [details] [diff] [review]:
-----------------------------------------------------------------

Makes sense. A nice simplification.

::: dom/base/nsGlobalWindow.cpp
@@ +916,5 @@
>    int32_t index = GetArrayIndexFromId(cx, id);
>    if (IsArrayIndex(index)) {
>      // Reject the set.  It's up to the caller to decide whether to throw a
>      // TypeError.  If the caller is strict mode JS code, it'll throw.
> +    return result.failReadOnly();

rebasing gunk, maybe? How did this compile before?
Attachment #8564262 - Flags: review?(efaustbmo) → review+
Yes, that was rebasing gunk.
https://hg.mozilla.org/mozilla-central/rev/b7a80ceeed2f
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla39
You need to log in before you can comment on or make changes to this bug.