The default bug view has changed. See this FAQ.

Implement the extended attributes for null and undefined handling on string arguments in Paris bindings

RESOLVED FIXED in mozilla17

Status

()

Core
DOM
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: bz, Assigned: peterv)

Tracking

(Blocks: 1 bug)

Trunk
mozilla17
x86
Mac OS X
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite ?

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 2 obsolete attachments)

We'll need it sometime.
Summary: Implement the extended attributes for null and undefined handling on strings → Implement the extended attributes for null and undefined handling on strings in Paris bindings
(Assignee)

Comment 1

5 years ago
Created attachment 654431 [details] [diff] [review]
v1
Assignee: nobody → peterv
Status: NEW → ASSIGNED
Blocks: 784869
(Assignee)

Updated

5 years ago
Attachment #654431 - Flags: review?(bzbarsky)
Blocks: 753517
Comment on attachment 654431 [details] [diff] [review]
v1

The mapping from the python enum to the C++ enum is a bit weird because we depend on treatAs having the same ordering as the python enum.

What if we used just a dict mapping the WebIDL string values to our desired string values, and then just stored the WebIDL string value in the IDLArgument?  That would at least nix the ordering dependency.  If we wanted to really be cool, we could change our C++ string values to match the WebIDL ones (e.g. replace eStringify with eDefault or something).

In the WebIDL parser, I don't think we should raise an error on TreatUndefinedAs=Missing.  That's not a problem for the parser per se, and the codegen will already raise an error on it.

In the codegen, even if type.nullable() we need to examine treatUndefinedAs, no?  In particular, if the argument is "[TreatUndefinedAs=EmptyString] DOMString?" then passing undefined should produce an empty string.

r=me with those last two bits fixed and maybe some parser tests added.  A followup bug is fine for the string/enum stuff.
Attachment #654431 - Flags: review?(bzbarsky) → review+
(Assignee)

Comment 3

5 years ago
Created attachment 654854 [details] [diff] [review]
v1.1
Attachment #654431 - Attachment is obsolete: true
Attachment #654854 - Flags: review+
(Assignee)

Comment 4

5 years ago
Created attachment 654874 [details] [diff] [review]
v1.2
Attachment #654854 - Attachment is obsolete: true
Attachment #654874 - Flags: review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/d5f32f0e1c05
Flags: in-testsuite?
Target Milestone: --- → mozilla17
https://hg.mozilla.org/mozilla-central/rev/d5f32f0e1c05
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Summary: Implement the extended attributes for null and undefined handling on strings in Paris bindings → Implement the extended attributes for null and undefined handling on string arguments in Paris bindings
You need to log in before you can comment on or make changes to this bug.