Closed
Bug 1416254
Opened 7 years ago
Closed 7 years ago
Remove conditional catch consumers in uriloader/.
Categories
(Firefox :: File Handling, enhancement)
Firefox
File Handling
Tracking
()
RESOLVED
FIXED
Firefox 59
People
(Reporter: arai, Assigned: arai)
References
Details
Attachments
(1 file)
3.86 KB,
patch
|
mak
:
review+
|
Details | Diff | Splinter Review |
non-standard conditional catch syntax is going to be removed in bug 1228841. there are 2 cases for replacement. case 1: only conditional catch from: try { A } catch (e if cond) { B } to try { A } catch (e) { if (!cond) { throw e; } B } case 2: conditional catch and unconditional catch from: try { A } catch (e if cond) { B } catch { C } to try { A } catch (e) { if (cond) { B } else { C } }
Assignee | ||
Comment 1•7 years ago
|
||
Attachment #8928554 -
Flags: review?(mak77)
Comment 2•7 years ago
|
||
Comment on attachment 8928554 [details] [diff] [review] Remove conditional catch consumers in uriloader/. Review of attachment 8928554 [details] [diff] [review]: ----------------------------------------------------------------- ::: uriloader/exthandler/tests/unit/test_badMIMEType.js @@ +17,5 @@ > getService(Ci.nsIMIMEService). > getFromTypeAndExtension(badMimeType, "txt"); > + } catch (e) { > + if (!(e instanceof Ci.nsIException && > + e.result == Cr.NS_ERROR_NOT_AVAILABLE)) { nit: for all the three cases here, I'd prefer the if (!e instanceof ... || e.result != ...)
Attachment #8928554 -
Flags: review?(mak77) → review+
Comment 3•7 years ago
|
||
ehr, you should still wrap (e instanceof ..) in parenthesis
Pushed by arai_a@mac.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/5d44a5636d44 Remove conditional catch consumers in uriloader/. r=mak
Assignee | ||
Comment 5•7 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/5d44a5636d44d0a8797aac01c922d01d8e0a6a5c Bug 1416254 - Remove conditional catch consumers in uriloader/. r=mak
Comment 6•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/5d44a5636d44
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
status-firefox59:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 59
Updated•6 years ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•