Bug 136690 - Web Inspector: Fix ESLint* no-avoidable-bind warnings
Summary: Web Inspector: Fix ESLint* no-avoidable-bind warnings
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-09 18:13 PDT by Joseph Pecoraro
Modified: 2014-09-10 08:49 PDT (History)
6 users (show)

See Also:


Attachments
[PATCH] Proposed Fix (4.94 KB, patch)
2014-09-09 18:14 PDT, Joseph Pecoraro
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Pecoraro 2014-09-09 18:13:37 PDT
I wrote an ESLint rule to catch avoidable Function.prototype.bind call with a number of built-in Array/Set/Map functional methods and it caught some issues in our code:
https://github.com/JosephPecoraro/eslint/commit/d64243a312b4e872bc3e63ccfa6ad84d2a29c675

UserInterface/Protocol/RemoteObject.js
  358:35  error  Function binding is avoidable. Use the optional thisArg argument of 'map'  no-avoidable-bind

UserInterface/Views/CSSStyleDetailsSidebarPanel.js
  47:8  error  Function binding is avoidable. Use the optional thisArg argument of 'forEach'  no-avoidable-bind

UserInterface/Views/LayerTreeSidebarPanel.js
  269:8  error  Function binding is avoidable. Use the optional thisArg argument of 'forEach'  no-avoidable-bind
  277:8  error  Function binding is avoidable. Use the optional thisArg argument of 'forEach'  no-avoidable-bind
  283:8  error  Function binding is avoidable. Use the optional thisArg argument of 'forEach'  no-avoidable-bind

UserInterface/Views/LogContentView.js
  646:8  error  Function binding is avoidable. Use the optional thisArg argument of 'forEach'  no-avoidable-bind

UserInterface/Views/TextResourceContentView.js
  90:22  error  Function binding is avoidable. Use the optional thisArg argument of 'filter'  no-avoidable-bind
Comment 1 Joseph Pecoraro 2014-09-09 18:14:25 PDT
Created attachment 237875 [details]
[PATCH] Proposed Fix
Comment 2 WebKit Commit Bot 2014-09-10 08:49:10 PDT
Comment on attachment 237875 [details]
[PATCH] Proposed Fix

Clearing flags on attachment: 237875

Committed r173462: <http://trac.webkit.org/changeset/173462>
Comment 3 WebKit Commit Bot 2014-09-10 08:49:13 PDT
All reviewed patches have been landed.  Closing bug.