Closed Bug 812742 Opened 11 years ago Closed 11 years ago

Sequence codegen is a major footgun

Categories

(Core :: DOM: Core & HTML, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla20

People

(Reporter: bzbarsky, Assigned: bzbarsky)

References

Details

Attachments

(1 file)

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.
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
https://hg.mozilla.org/mozilla-central/rev/c3d44fd7dce4
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.