Use NS_FAILED instead of boolean test (dom/indexedDB/, dom/workers/)

RESOLVED FIXED in mozilla17

Status

()

Core
DOM
--
minor
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: ayg, Assigned: ayg)

Tracking

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

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Comment hidden (empty)
Created attachment 651709 [details] [diff] [review]
Patch

Testing an nsresult as a boolean isn't correct use of nsresult -- there are success codes other than NS_OK.  (Although maybe there shouldn't be!)  This will no longer compile when nsresult is an enum class, because enum classes can't be implicitly converted to other types.

This shouldn't change behavior as long as nothing here uses success codes other than NS_OK.  I wasn't able to easily verify that was the case here, but it seems likely.
Attachment #651709 - Flags: review?(jonas)
Attachment #651709 - Flags: review?(jonas) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/11d577df701f

Green try: https://tbpl.mozilla.org/?tree=Try&rev=da4047717ef7
Flags: in-testsuite-
https://hg.mozilla.org/mozilla-central/rev/11d577df701f
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla17
You need to log in before you can comment on or make changes to this bug.