Closed Bug 1328802 Opened 9 years ago Closed 9 years ago

Enable the no-unsafe-finally rule for eslint

Categories

(Toolkit :: General, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla53
Tracking Status
firefox53 --- fixed

People

(Reporter: jaws, Assigned: jaws)

Details

Attachments

(1 file)

There are four errors with this rule enabled. Three of them seem innocuous but one of them appears to be a legitimate bug because an exception that is caught is rethrown in the catch block, but the finally block returns true thus preventing the exception from being rethrown. c:\fx\browser\base\content\browser-gestureSupport.js 1154:7 error Unsafe usage of ReturnStatement. no-unsafe-finally (eslint) c:\fx\toolkit\components\telemetry\TelemetryStorage.jsm 1524:13 error Unsafe usage of ContinueStatement. no-unsafe-finally (eslint) c:\fx\toolkit\modules\WindowsRegistry.jsm 87:7 error Unsafe usage of ReturnStatement. no-unsafe-finally (eslint) c:\fx\toolkit\mozapps\extensions\internal\GMPProvider.jsm 315:9 error Unsafe usage of ReturnStatement. no-unsafe-finally (eslint)
Comment on attachment 8823951 [details] Bug 1328802 - Enable the no-unsafe-finally rule for eslint and fix the four errors that are triggered by it by moving the control flow statement outside of the finally block. https://reviewboard.mozilla.org/r/102430/#review102980
Attachment #8823951 - Flags: review?(dtownsend) → review+
Pushed by jwein@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/3d43f110b88c Enable the no-unsafe-finally rule for eslint and fix the four errors that are triggered by it by moving the control flow statement outside of the finally block. r=mossop
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: