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
Created attachment 237875 [details] [PATCH] Proposed Fix
Comment on attachment 237875 [details] [PATCH] Proposed Fix Clearing flags on attachment: 237875 Committed r173462: <http://trac.webkit.org/changeset/173462>
All reviewed patches have been landed. Closing bug.