Sequence codegen is a major footgun

RESOLVED FIXED in mozilla20

Status

()

Core
DOM
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: bz, Assigned: bz)

Tracking

unspecified
mozilla20
x86
Mac OS X
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

It passes through "(*arr.AppendElement())" as the declName, so if the inner type conversion template uses ${declName} twice bad things happen.  Luckily nothing does that, as far as I can tell... until bug 767933.
Created attachment 682719 [details] [diff] [review]
Fix sequence codegen to not do AppendElement multiple times by accident.
Attachment #682719 - Flags: review?(peterv)
Blocks: 767933
Whiteboard: [need review]
Comment on attachment 682719 [details] [diff] [review]
Fix sequence codegen to not do AppendElement multiple times by accident.

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

::: dom/bindings/Codegen.py
@@ +2221,5 @@
>                      {
>                          "val" : "temp",
>                          "valPtr": "&temp",
> +                        "declName" : "slot",
> +                        "holderName": "tempHolder",

This tempHolder shouldn't be used, right? Can we keep not passing a holderName? If not, we should at least add a comment about that.
Attachment #682719 - Flags: review?(peterv) → review+
http://hg.mozilla.org/integration/mozilla-inbound/rev/c3d44fd7dce4 with a comment added explaining the holderName bit.

Bug 767933 will make us fail tests without this patch, so in-testsuite+.
Flags: in-testsuite+
Whiteboard: [need review]
Target Milestone: --- → mozilla20

Comment 4

5 years ago
https://hg.mozilla.org/mozilla-central/rev/c3d44fd7dce4
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.