Closed Bug 1294620 Opened 8 years ago Closed 8 years ago

Use infallible XPIDL attribute getters more

Categories

(Core :: XPCOM, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla51
Tracking Status
firefox51 --- fixed

People

(Reporter: n.nethercote, Assigned: n.nethercote)

Details

Attachments

(1 file)

For any XPIDL attribute marked with [infallible] we generate an infallible
getter that wraps the fallible getter and asserts that it succeeds.

There are plenty of places in the codebase where we don't take advantage of
these infallible getters.
This makes a lot of code more compact, and also avoids some redundant nsresult
checks.

The patch also removes a handful of redundant checks on infallible setters.
Attachment #8780379 - Flags: review?(erahm)
Comment on attachment 8780379 [details] [diff] [review]
Use infallible XPIDL attribute getters more

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

r=me. Nice cleanup!
Attachment #8780379 - Flags: review?(erahm) → review+
https://hg.mozilla.org/mozilla-central/rev/ef4aaae8d79b
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: