Closed
Bug 841429
Opened 11 years ago
Closed 11 years ago
passing optional integer arguments with default values in callback interface generates invalid code
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla23
People
(Reporter: mccr8, Assigned: bzbarsky)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
callback interface Foo { void passOptionalByteWithDefault(optional byte arg = 0); }; generates code like: if (arg.WasPassed()) { argv[0] = INT_TO_JSVAL(int32_t(arg.Value())); break; where arg is int8_t
Assignee | ||
Updated•11 years ago
|
Blocks: ParisBindings
Reporter | ||
Comment 1•11 years ago
|
||
As you may guess, this also applies to the other integer types.
Summary: passing optional byte with default argument in callback interface generates invalid code → passing optional integer arguments with default values in callback interface generates invalid code
Reporter | ||
Comment 2•11 years ago
|
||
Also for at least one non-integer pattern this fails: callback interface Foo { void passOptionalSelfWithDefault(optional Foo? arg = null); }; with errors like: /Users/amccreight/mz/cent/obj-dbg/dom/bindings/JSImplBinding.cpp:35:12: error: member reference type 'mozilla::dom::Foo *' is a pointer; maybe you meant to use '->'? if (arg.WasPassed()) { ~~~^ -> /Users/amccreight/mz/cent/obj-dbg/dom/bindings/JSImplBinding.cpp:35:13: error: no member named 'WasPassed' in 'mozilla::dom::Foo' if (arg.WasPassed()) { ~~~ ^ Presumably basically the same thing...
Assignee | ||
Comment 3•11 years ago
|
||
Attachment #731386 -
Flags: review?(continuation)
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → bzbarsky
Assignee | ||
Updated•11 years ago
|
Whiteboard: [need review]
Reporter | ||
Updated•11 years ago
|
Attachment #731386 -
Flags: review?(continuation) → review+
Assignee | ||
Comment 4•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/592316b9ce80
Flags: in-testsuite+
Whiteboard: [need review]
Target Milestone: --- → mozilla23
Comment 5•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/592316b9ce80
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•