| Summary: | Web Inspector: Simplify some functional callbacks | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Joseph Pecoraro <joepeck> | ||||
| Component: | Web Inspector | Assignee: | Joseph Pecoraro <joepeck> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | bburg, commit-queue, graouts, joepeck, mattbaker, nvasilyev, timothy, webkit-bug-importer | ||||
| Priority: | P2 | Keywords: | DoNotImportToRadar | ||||
| Version: | WebKit Nightly Build | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Attachments: |
|
||||||
Created attachment 261487 [details]
[PATCH] Proposed Fix
Comment on attachment 261487 [details]
[PATCH] Proposed Fix
r=me
I did not know you could Array.map a constructor, but i guess it works!
Comment on attachment 261487 [details] [PATCH] Proposed Fix Clearing flags on attachment: 261487 Committed r189965: <http://trac.webkit.org/changeset/189965> All reviewed patches have been landed. Closing bug. > I did not know you could Array.map a constructor
To be clear, none of these were replacing calls to constructors. They happened to be functions that took in an argument and returned a value. `Number`, `isNaN`, `WebInspector.Foo.fromProtocol`.
Number is just weird in that it can be used with `new` but is even better when used without it =).
|
* SUMMARY Simplify some functional callbacks. We have a few cases of: arr.map( (x) => { return foo(x) } ) Which can just be: arr.map(foo)