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

RESOLVED FIXED in mozilla17

Status

()

defect
RESOLVED FIXED
7 years ago
3 months ago

People

(Reporter: bzbarsky, Assigned: peterv)

Tracking

(Blocks 1 bug)

Trunk
mozilla17
x86
macOS
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

7 years ago
Posted patch v1 (obsolete) — Splinter Review
Assignee: nobody → peterv
Status: NEW → ASSIGNED
Blocks: 784869
Assignee

Updated

7 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

7 years ago
Posted patch v1.1 (obsolete) — Splinter Review
Attachment #654431 - Attachment is obsolete: true
Attachment #654854 - Flags: review+
Assignee

Comment 4

7 years ago
Posted patch v1.2Splinter Review
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
Closed: 7 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
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.