WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
136690
Web Inspector: Fix ESLint* no-avoidable-bind warnings
https://bugs.webkit.org/show_bug.cgi?id=136690
Summary
Web Inspector: Fix ESLint* no-avoidable-bind warnings
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
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
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.
Top of Page
Format For Printing
XML
Clone This Bug