Last Comment Bug 1328802 - Enable the no-unsafe-finally rule for eslint
: Enable the no-unsafe-finally rule for eslint
Status: RESOLVED FIXED
:
Product: Toolkit
Classification: Components
Component: General (show other bugs)
: unspecified
: Unspecified Unspecified
-- normal (vote)
: mozilla53
Assigned To: Jared Wein [:jaws] (please needinfo? me)
:
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-01-04 21:37 PST by Jared Wein [:jaws] (please needinfo? me)
Modified: 2017-01-05 17:29 PST (History)
1 user (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
fixed

MozReview Requests
Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:
Show discarded requests

Attachments
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. (59 bytes, text/x-review-board-request)
2017-01-04 21:42 PST, Jared Wein [:jaws] (please needinfo? me)
dtownsend: review+
Details | Review

Description User image Jared Wein [:jaws] (please needinfo? me) 2017-01-04 21:37:06 PST
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 1 User image Jared Wein [:jaws] (please needinfo? me) 2017-01-04 21:42:45 PST Comment hidden (mozreview-request)
Comment 2 User image Dave Townsend [:mossop] 2017-01-05 08:30:22 PST
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
Comment 3 User image Pulsebot 2017-01-05 09:11:57 PST
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
Comment 4 User image Wes Kocher (:KWierso) 2017-01-05 17:29:53 PST
https://hg.mozilla.org/mozilla-central/rev/3d43f110b88c

Note You need to log in before you can comment on or make changes to this bug.