Closed Bug 791213 Opened 12 years ago Closed 12 years ago

GetIntPref() in nsMediaPluginHost.cpp returns nsresult instead of bool in failure paths

Categories

(Core :: Audio/Video, defect)

defect
Not set
minor

Tracking

()

RESOLVED FIXED
mozilla18

People

(Reporter: ayg, Assigned: ayg)

References

Details

Attachments

(1 file)

NS_ENSURE_ARG_POINTER() returns an nsresult on failure, so it should only be used for functions that are actually declared to return an nsresult.  Returning false here makes more sense.  (Although the only caller ignores the return value, so perhaps it should return void instead to be more explicit.)
Let me know if you want a different change.  Personally, I'd make the function void given that nothing uses the result, but I went for the less intrusive change for the purposes of this patch.

Try (compile-only): https://tbpl.mozilla.org/?tree=Try&rev=544ffec01e47
Attachment #661188 - Flags: review?(chris.double)
Attachment #661188 - Flags: review?(chris.double) → review+
https://hg.mozilla.org/mozilla-central/rev/33087122ace7
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla18
You need to log in before you can comment on or make changes to this bug.