* SUMMARY Cleanup DebuggerManager, reduce `delete` and use Maps instead of objects.
<rdar://problem/22954630>
Created attachment 262371 [details] [Patch] Proposed Fix
No instances of delete to remove (other than those used to remove hashmap object properties), just the switch to using Map.
Comment on attachment 262371 [details] [Patch] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=262371&action=review r=me > Source/WebInspectorUI/UserInterface/Controllers/DebuggerManager.js:280 > + if (this._breakpointURLMap.has(sourceCode.url)) { > + let urlBreakpoints = this._breakpointURLMap.get(sourceCode.url); I tend to think we should reduce "has" && "get" to just a get. let urlBreakpoints = this._breakpointURLMap.get(sourceCode.url); if (urlBreakpoints) { ... } > Source/WebInspectorUI/UserInterface/Controllers/DebuggerManager.js:286 > + if (sourceCode instanceof WebInspector.Script && this._breakpointScriptIdentifierMap.has(sourceCode.id)) { > + let scriptIdentifierBreakpoints = this._breakpointScriptIdentifierMap.get(sourceCode.id); Same here, but it would involve more rewriting. > Source/WebInspectorUI/UserInterface/Controllers/DebuggerManager.js:296 > - return this._breakpointIdMap[id]; > + return this._breakpointIdMap.get(id); We probably should do `|| null` here too. > Source/WebInspectorUI/UserInterface/Controllers/DebuggerManager.js:301 > + return this._scriptIdMap.get(id); This should still have `|| null` to return `null` for missing values instead of `undefined`.
Created attachment 262374 [details] [Patch] For Landing
Comment on attachment 262374 [details] [Patch] For Landing Clearing flags on attachment: 262374 Committed r190540: <http://trac.webkit.org/changeset/190540>
All reviewed patches have been landed. Closing bug.