Closed Bug 856338 Opened 12 years ago Closed 12 years ago

Using sequence<foo>? as an argument type crashes when passing non-null value

Categories

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

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla23

People

(Reporter: smaug, Assigned: smaug)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

In the generated code we never initialize the Sequence to non-null value.
Attached patch Patch v1 (deleted) — Splinter Review
Want to try this?
Attachment #731512 - Flags: feedback?(bugs)
Comment on attachment 731512 [details] [diff] [review] Patch v1 So the patch gives /home/smaug/mozilla/hg/mozilla/ff_build/dom/bindings/NotifyAudioAvailableEventBinding.cpp: In function ‘bool mozilla::dom::NotifyAudioAvailableEventBinding::initAudioAvailableEvent(JSContext*, JSHandleObject, nsDOMNotifyAudioAvailableEvent*, unsigned int, JS::Value*)’: /home/smaug/mozilla/hg/mozilla/ff_build/dom/bindings/NotifyAudioAvailableEventBinding.cpp:112:75: error: passing ‘const mozilla::dom::Nullable<mozilla::dom::Sequence<float> >’ as ‘this’ argument of ‘T& mozilla::dom::Nullable<T>::SetValue() [with T = mozilla::dom::Sequence<float>]’ discards qualifiers [-fpermissive]
Attachment #731512 - Flags: feedback?(bugs) → feedback-
/me fixes the const problem
Attached patch const handling (deleted) — Splinter Review
Not super pretty, but seems to work.
Attachment #740497 - Flags: review?(bzbarsky)
Comment on attachment 740497 [details] [diff] [review] const handling r=me
Attachment #740497 - Flags: review?(bzbarsky) → review+
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla23
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: