Closed Bug 1307665 Opened 8 years ago Closed 8 years ago

Use MOZ_MUST_USE in netwerk/protocol/ftp

Categories

(Core :: Networking, defect)

defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: wcpan, Assigned: wcpan)

References

Details

(Whiteboard: [necko-active])

Attachments

(1 file)

Assignee: nobody → wpan
Blocks: 1303701
Failed tests:
dom/tests/mochitest/whatwg/test_postMessage_origin.xhtml
dom/xul/test/test_bug497875.xul
browser/base/content/test/urlbar/browser_canonizeURL.js

This line will try to remove a connection which does not exist:
https://dxr.mozilla.org/mozilla-central/rev/ea104eeb14cc54da9a06c3766da63f73117723a0/netwerk/protocol/ftp/nsFtpConnectionThread.cpp#268

Is it intentional/safe here?
Flags: needinfo?(valentin.gosu)
Yes, that seems to be safe. If the call returns NS_ERROR_FAILURE, connection will be null, and we handle the case in the line below that. So you can just ignore the result value, or assert that it is FAILURE or NS_OK.
Flags: needinfo?(valentin.gosu)
Comment on attachment 8798699 [details]
Bug 1307665 - Use MOZ_MUST_USE in netwerk/protocol/ftp

https://reviewboard.mozilla.org/r/84118/#review83366

Please use MOZ_ASSERT, or Unused << rv;
I have a feeling some of these calls might fails from time to time, and even if it's nightly and aurora, I'd hate to have to track down crashes caused by non-fatal error codes. The code is barely used anyway.
Attachment #8798699 - Flags: review?(valentin.gosu) → review-
Whiteboard: [necko-active]
I'm only taking security fixes to the ftp code these days.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: