Bug 136690

Summary: Web Inspector: Fix ESLint* no-avoidable-bind warnings
Product: WebKit Reporter: Joseph Pecoraro <joepeck>
Component: Web InspectorAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, graouts, joepeck, jonowells, timothy, webkit-bug-importer
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
[PATCH] Proposed Fix none

Joseph Pecoraro
Reported 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
Attachments
[PATCH] Proposed Fix (4.94 KB, patch)
2014-09-09 18:14 PDT, Joseph Pecoraro
no flags
Joseph Pecoraro
Comment 1 2014-09-09 18:14:25 PDT
Created attachment 237875 [details] [PATCH] Proposed Fix
WebKit Commit Bot
Comment 2 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>
WebKit Commit Bot
Comment 3 2014-09-10 08:49:13 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.