Closed Bug 604147 Opened 15 years ago Closed 14 years ago

nsSMILTimedElement::GetNextInterval should return PRBool instead of nsresult

Categories

(Core :: SVG, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla5

People

(Reporter: dholbert, Assigned: dholbert)

Details

Attachments

(1 file)

nsSMILTimedElement::GetNextInterval() returns nsresult right now, but: (a) there are only two states it returns -- NS_OK or NS_ERROR_FAILURE (b) the failure case isn't particularly "fail"-ish -- it's just "there's no next interval" Consequently, I think we should simplify it to just return PRBool. (PR_TRUE on success, PR_FALSE on failure) birtles, any objections?
Attached patch fixSplinter Review
This patch - makes the nsresult --> PRBool fix - adds "const" to the static constant variable "zeroTime", for clarity - for two of the modified return statements: adds curly braces for clarity, since these early-returns were very close to a different clause's opening or closing brace (which makes the if-nesting harder to see).
Assignee: nobody → dholbert
Status: NEW → ASSIGNED
Attachment #482962 - Flags: review?
Attachment #482962 - Flags: review? → review?(birtles)
Comment on attachment 482962 [details] [diff] [review] fix Looks great.
Attachment #482962 - Flags: review?(birtles) → review+
Comment on attachment 482962 [details] [diff] [review] fix Requesting approval to land. Low-risk -- no functional change, just code simplification. (Replacing an unnecessary nsresult return value with PRBool for success/failure.)
Attachment #482962 - Flags: approval2.0?
Attachment #482962 - Flags: approval2.0? → approval2.0-
Whiteboard: [needs landing post-2.0]
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Whiteboard: [needs landing post-2.0]
Target Milestone: --- → mozilla2.2
Thanks, Ehsan!
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: