Make HTMLOptionElement.index infallible

RESOLVED FIXED in mozilla26

Status

()

RESOLVED FIXED
5 years ago
3 years ago

People

(Reporter: Ms2ger, Assigned: Ms2ger)

Tracking

Trunk
mozilla26
Points:
---
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
Created attachment 788562 [details] [diff] [review]
Patch v1

In the simple case, GetOptionIndex can't fail.
Attachment #788562 - Flags: review?(mounir)
Comment on attachment 788562 [details] [diff] [review]
Patch v1

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

In ::Index(), could you define a variable that will be the default returned value. I would like this to be clear that 0 is the value to return when the index is not present. If there is a static const variable, it might make things clearer.
Attachment #788562 - Flags: review?(mounir) → review+
(Assignee)

Comment 2

5 years ago
https://hg.mozilla.org/mozilla-central/rev/698c66920a41
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Target Milestone: --- → mozilla26

Updated

3 years ago
Depends on: 1250401
You need to log in before you can comment on or make changes to this bug.