Closed Bug 794959 Opened 12 years ago Closed 12 years ago

Use the right cast in GetAs* functions of union types in new DOM bindings

Categories

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

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla18

People

(Reporter: peterv, Assigned: peterv)

References

(Depends on 1 open bug)

Details

Attachments

(1 file)

Attached patch v1Splinter Review
Currently we use an old-style cast to ${externalType}, but that's wall-paper over the real problem (and wrong). We need to cast away the const that we get from calling UnionMember.Value(), otherwise for |UnionMember<NonNull<T> >| we might be forcing a cast from |const NonNull<T>&| to |T&|, which doesn't do the right thing.
Attachment #665477 - Flags: review?(bzbarsky)
Comment on attachment 665477 [details] [diff] [review]
v1

Ah, excellent.  r=me
Attachment #665477 - Flags: review?(bzbarsky) → review+
https://hg.mozilla.org/mozilla-central/rev/f4c544d409bd

Should this have a test?
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Flags: in-testsuite?
Resolution: --- → FIXED
Depends on: 798004
I'm having the same issue.
Sorry, that was in regards to bug 798004.
Are you also using an unsupported compiler?
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: