[webkit-reviews] review granted: [Bug 219231] Web Inspector: implement Map.prototype.take() and fix Set.prototype.take() : [Attachment 414746] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Nov 20 17:44:55 PST 2020
Devin Rousso <drousso at apple.com> has granted Brian Burg <bburg at apple.com>'s
request for review:
Bug 219231: Web Inspector: implement Map.prototype.take() and fix
Set.prototype.take()
https://bugs.webkit.org/show_bug.cgi?id=219231
Attachment 414746: Patch
https://bugs.webkit.org/attachment.cgi?id=414746&action=review
--- Comment #2 from Devin Rousso <drousso at apple.com> ---
Comment on attachment 414746
--> https://bugs.webkit.org/attachment.cgi?id=414746
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=414746&action=review
r=me, with some behavior changes
> Source/WebInspectorUI/UserInterface/Base/Multimap.js:94
> + return new Set;
this should be `undefined` to match what `get` does when the `key` is not in
`_map`
> Source/WebInspectorUI/UserInterface/Base/Multimap.js:101
> + let taken = valueSet.take(value);
> +
> + if (!valueSet.size)
> + this._map.delete(key);
> +
> + return new Set([taken]);
this should match `Set.prototype.take`
```
let result = valueSet.take(value);
if (!valueSet.size)
this._map.delete(key);
return result;
```
More information about the webkit-reviews
mailing list