WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
182219
Web Inspector: Replace Object.shallowMerge with ES2018 spread operator
https://bugs.webkit.org/show_bug.cgi?id=182219
Summary
Web Inspector: Replace Object.shallowMerge with ES2018 spread operator
Nikita Vasilyev
Reported
2018-01-27 19:53:46 PST
Object.shallowMerge defined in Utilities.js is no longer needed with ES2018 spread operator. Object.shallowMerge(a, b) can be replaced with: {...a, ...b}
Attachments
Patch
(7.88 KB, patch)
2018-01-27 22:13 PST
,
Devin Rousso
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Devin Rousso
Comment 1
2018-01-27 22:13:38 PST
Created
attachment 332488
[details]
Patch My only hesitation to this is that we might get collisions between keys (such as if we chain an options variable between functions), but I think that will be very rare
Blaze Burg
Comment 2
2018-01-30 09:30:52 PST
Comment on
attachment 332488
[details]
Patch r=me
Joseph Pecoraro
Comment 3
2018-01-30 10:34:26 PST
Comment on
attachment 332488
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=332488&action=review
> Source/WebInspectorUI/UserInterface/Base/DOMUtilities.js:68 > - return WI.linkifyNodeReferenceElement(node, link, Object.shallowMerge(options, {displayName})); > + return WI.linkifyNodeReferenceElement(node, link, {...options, displayName});
I find this a little harder to read / understand, but I suppose its fine.
WebKit Commit Bot
Comment 4
2018-01-30 16:39:24 PST
Comment on
attachment 332488
[details]
Patch Clearing flags on attachment: 332488 Committed
r227864
: <
https://trac.webkit.org/changeset/227864
>
WebKit Commit Bot
Comment 5
2018-01-30 16:39:25 PST
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 6
2018-01-30 16:40:18 PST
<
rdar://problem/37048353
>
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