RESOLVED FIXED 136682
Web Inspector: Fix ESLint consistent-return warnings
https://bugs.webkit.org/show_bug.cgi?id=136682
Summary Web Inspector: Fix ESLint consistent-return warnings
Joseph Pecoraro
Reported 2014-09-09 15:10:29 PDT
This warning warns about inconsistent use of "return x" and "return" within a function. This fixes all but CodeMirrorCompletionController.js warning which have key handlers that either bail or return CodeMirror.Pass.
Attachments
[PATCH] Proposed Fix (12.82 KB, patch)
2014-09-09 15:11 PDT, Joseph Pecoraro
no flags
[PATCH] Proposed Fix (13.23 KB, patch)
2014-09-09 15:13 PDT, Joseph Pecoraro
no flags
Joseph Pecoraro
Comment 1 2014-09-09 15:11:46 PDT
Created attachment 237861 [details] [PATCH] Proposed Fix
Joseph Pecoraro
Comment 2 2014-09-09 15:13:41 PDT
Created attachment 237863 [details] [PATCH] Proposed Fix Better fix, includes the change to the eslintrc file.
Timothy Hatcher
Comment 3 2014-09-10 08:16:18 PDT
Comment on attachment 237863 [details] [PATCH] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=237863&action=review > Source/WebInspectorUI/UserInterface/Controllers/FrameResourceManager.js:-389 > console.assert(!this._waitingForMainFrameResourceTreePayload); > - if (this._waitingForMainFrameResourceTreePayload) > - return; Why isn't the early return needed still? It would be bad to continue here.
Joseph Pecoraro
Comment 4 2014-09-10 11:39:35 PDT
Comment on attachment 237863 [details] [PATCH] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=237863&action=review >> Source/WebInspectorUI/UserInterface/Controllers/FrameResourceManager.js:-389 >> - return; > > Why isn't the early return needed still? It would be bad to continue here. Checking all the callers, this should never be reached if this._waitingForMainFrameResourceTreePayload. So rather then return null which could throw an exception earlier on, I just left the assert.
WebKit Commit Bot
Comment 5 2014-09-10 12:15:43 PDT
Comment on attachment 237863 [details] [PATCH] Proposed Fix Clearing flags on attachment: 237863 Committed r173477: <http://trac.webkit.org/changeset/173477>
WebKit Commit Bot
Comment 6 2014-09-10 12:15:47 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.