Bug 158330 - Web Inspector: Modernize Array.prototype.every/some callsites to arrow functions
Summary: Web Inspector: Modernize Array.prototype.every/some callsites to arrow functions
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Joseph Pecoraro
URL:
Keywords: DoNotImportToRadar
Depends on:
Blocks:
 
Reported: 2016-06-02 17:21 PDT by Joseph Pecoraro
Modified: 2016-06-02 18:17 PDT (History)
8 users (show)

See Also:


Attachments
[PATCH] Proposed Fix (12.78 KB, patch)
2016-06-02 17:22 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 2016-06-02 17:21:38 PDT
* SUMMARY
Modernize Array.prototype.every/some callsites to arrow functions.

This patch addresses cases of:

  - Array.prototype.every
  - Array.prototype.some

Before:

    return this._items.filter(function(item) {
        return item.selected;
    });

After:

    return this._items.filter((item) => item.selected);

Things to watch out for:

    - These Array methods may take an optional `this` object. Arrow functions may override that.
Comment 1 Joseph Pecoraro 2016-06-02 17:22:17 PDT
Created attachment 280389 [details]
[PATCH] Proposed Fix
Comment 2 BJ Burg 2016-06-02 17:55:06 PDT
Comment on attachment 280389 [details]
[PATCH] Proposed Fix

r=me
Comment 3 WebKit Commit Bot 2016-06-02 18:17:39 PDT
Comment on attachment 280389 [details]
[PATCH] Proposed Fix

Clearing flags on attachment: 280389

Committed r201630: <http://trac.webkit.org/changeset/201630>
Comment 4 WebKit Commit Bot 2016-06-02 18:17:43 PDT
All reviewed patches have been landed.  Closing bug.