Closed Bug 1142828 Opened 5 years ago Closed 5 years ago

Refactor to avoid having [[Set]]-specific weird cases in the [[DefineOwnProperty]] code

Categories

(Core :: JavaScript Engine, defect)

x86_64
Linux
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla40
Tracking Status
firefox40 --- fixed

People

(Reporter: jorendorff, Assigned: jorendorff)

References

Details

Attachments

(1 file)

a.k.a. will you please get your dill pickle butter out of my chocolate, this flavor pairing does not work for me
Blocks: 1125624
NativeSetExistingDataProperty is only moved in this changeset; its body is not modified.
Attachment #8584644 - Flags: review?(jwalden+bmo)
Assignee: nobody → jorendorff
Status: NEW → ASSIGNED
Comment on attachment 8584644 [details] [diff] [review]
Refactor to avoid having [[Set]]-specific weird cases in the [[DefineOwnProperty]] code

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

::: js/src/vm/NativeObject.cpp
@@ +2098,5 @@
> +        // unfortunate thing about Class getters and setters. Since the above
> +        // DefineProperty call succeeded, receiver is native, and the property
> +        // has a setter (and thus can't be a dense element), this lookup is
> +        // guaranteed to succeed.
> +        RootedShape shape(cx, nativeReceiver->lookup(cx, id));

Perhaps worth an assert of that, to avoid ending up deep in the guts of NSEDP whenever the ultimate crash/assert might happen if this turned out wrong sometime.
Attachment #8584644 - Flags: review?(jwalden+bmo) → review+
Flags: needinfo?(jorendorff)
https://hg.mozilla.org/mozilla-central/rev/9c266a3e3c64
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
You need to log in before you can comment on or make changes to this bug.