Also, instead of using `delete` operator use Map#delete.
<rdar://problem/30590110>
Created attachment 302042 [details] Patch
Comment on attachment 302042 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=302042&action=review r=me > Source/WebInspectorUI/UserInterface/Controllers/FrameResourceManager.js:72 > var frames = []; > - for (var key in this._frameIdentifierMap) > - frames.push(this._frameIdentifierMap[key]); > + for (let [key, value] of this._frameIdentifierMap) > + frames.push(value); > > return frames; How about just [...map.values()] > Source/WebInspectorUI/UserInterface/Controllers/FrameResourceManager.js:536 > + this._resourceRequestIdentifierMap = new Map; > + this._frameIdentifierMap = new Map; These could be .clear(), but I think new Map is fine.
(In reply to comment #3) > Comment on attachment 302042 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=302042&action=review > > r=me > > > Source/WebInspectorUI/UserInterface/Controllers/FrameResourceManager.js:72 > > var frames = []; > > - for (var key in this._frameIdentifierMap) > > - frames.push(this._frameIdentifierMap[key]); > > + for (let [key, value] of this._frameIdentifierMap) > > + frames.push(value); > > > > return frames; > > How about just [...map.values()] This's so much more concise! I forgot that `...` can be used with any iterator.
Created attachment 302046 [details] Patch
Comment on attachment 302046 [details] Patch Clearing flags on attachment: 302046 Committed r212603: <http://trac.webkit.org/changeset/212603>
All reviewed patches have been landed. Closing bug.