Closed Bug 935612 Opened 11 years ago Closed 11 years ago

We should stop using TreatUndefinedAs in PhoneNumberService.webidl

Categories

(Core :: DOM: Device Interfaces, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla28

People

(Reporter: bzbarsky, Assigned: bzbarsky)

References

Details

Attachments

(1 file)

WebIDL is likely going to drop TreatUndefinedAs entirely; in our tree this API is the sole consumer at this point, once the bogosity of bug 929435 is sorted out.

Now that bug 829248 is fixed, I believe this API can simply be rewritten as:

 DOMRequest fuzzyMatch([TreatNullAs=EmptyString] optional DOMString number1 = "",
                       [TreatNullAs=EmptyString] optional DOMString number2 = "");

right?
If I understand correctly that undefined/missing parameters to fuzzyMatch will take the default value of an empty string, then yes this would be a good change.
Yes.  The one difference from what we have today is that this:

  fuzzyMatch();

would just act like fuzzyMatch("", "") instead of throwing an exception.  Is that OK?
I don't see a problem with that.
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Blocks: 936634
Whiteboard: [need review]
Comment on attachment 829485 [details] [diff] [review]
Stop using TreatUndefinedAs in PhoneNumberService.

Review of attachment 829485 [details] [diff] [review]:
-----------------------------------------------------------------

Mochitests (chrome/plain) still green for desktop, integration tests still green for B2G. LGTM.
Attachment #829485 - Flags: review?(mhenretty) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/f605430674e2
Flags: in-testsuite-
Whiteboard: [need review]
Target Milestone: --- → mozilla28
https://hg.mozilla.org/mozilla-central/rev/f605430674e2
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: