Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 49 /** @type {!Map<!Workspace.UISourceCode, !Map<number, !Map<number, !Array<!B indings.BreakpointManager.Breakpoint>>>>} */ | 49 /** @type {!Map<!Workspace.UISourceCode, !Map<number, !Map<number, !Array<!B indings.BreakpointManager.Breakpoint>>>>} */ |
| 50 this._breakpointsForUISourceCode = new Map(); | 50 this._breakpointsForUISourceCode = new Map(); |
| 51 /** @type {!Map<!Workspace.UISourceCode, !Array<!Bindings.BreakpointManager. Breakpoint>>} */ | 51 /** @type {!Map<!Workspace.UISourceCode, !Array<!Bindings.BreakpointManager. Breakpoint>>} */ |
| 52 this._breakpointsForPrimaryUISourceCode = new Map(); | 52 this._breakpointsForPrimaryUISourceCode = new Map(); |
| 53 /** @type {!Multimap.<string, !Bindings.BreakpointManager.Breakpoint>} */ | 53 /** @type {!Multimap.<string, !Bindings.BreakpointManager.Breakpoint>} */ |
| 54 this._provisionalBreakpoints = new Multimap(); | 54 this._provisionalBreakpoints = new Multimap(); |
| 55 | 55 |
| 56 this._workspace.addEventListener(Workspace.Workspace.Events.ProjectRemoved, this._projectRemoved, this); | 56 this._workspace.addEventListener(Workspace.Workspace.Events.ProjectRemoved, this._projectRemoved, this); |
| 57 this._workspace.addEventListener(Workspace.Workspace.Events.UISourceCodeAdde d, this._uiSourceCodeAdded, this); | 57 this._workspace.addEventListener(Workspace.Workspace.Events.UISourceCodeAdde d, this._uiSourceCodeAdded, this); |
| 58 this._workspace.addEventListener(Workspace.Workspace.Events.UISourceCodeRemo ved, this._uiSourceCodeRemoved, this); | 58 this._workspace.addEventListener(Workspace.Workspace.Events.UISourceCodeRemo ved, this._uiSourceCodeRemoved, this); |
| 59 this._debuggerWorkspaceBinding.addEventListener( | |
| 60 Bindings.DebuggerWorkspaceBinding.Events.SourceMappingChanged, this._uiS ourceCodeMappingChanged, this); | |
| 61 | 59 |
| 62 targetManager.observeModels(SDK.DebuggerModel, this); | 60 targetManager.observeModels(SDK.DebuggerModel, this); |
| 63 } | 61 } |
| 64 | 62 |
| 65 /** | 63 /** |
| 66 * @param {string} url | 64 * @param {string} url |
| 67 * @param {number} lineNumber | 65 * @param {number} lineNumber |
| 68 * @param {number} columnNumber | 66 * @param {number} columnNumber |
| 69 * @return {string} | 67 * @return {string} |
| 70 */ | 68 */ |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 166 | 164 |
| 167 /** | 165 /** |
| 168 * @param {!Common.Event} event | 166 * @param {!Common.Event} event |
| 169 */ | 167 */ |
| 170 _uiSourceCodeRemoved(event) { | 168 _uiSourceCodeRemoved(event) { |
| 171 var uiSourceCode = /** @type {!Workspace.UISourceCode} */ (event.data); | 169 var uiSourceCode = /** @type {!Workspace.UISourceCode} */ (event.data); |
| 172 this._removeUISourceCode(uiSourceCode); | 170 this._removeUISourceCode(uiSourceCode); |
| 173 } | 171 } |
| 174 | 172 |
| 175 /** | 173 /** |
| 176 * @param {!Common.Event} event | |
| 177 */ | |
| 178 _uiSourceCodeMappingChanged(event) { | |
| 179 var uiSourceCode = /** @type {!Workspace.UISourceCode} */ (event.data.uiSour ceCode); | |
| 180 var isIdentity = /** @type {boolean} */ (event.data.isIdentity); | |
| 181 var debuggerModel = /** @type {!SDK.DebuggerModel} */ (event.data.debuggerMo del); | |
| 182 if (isIdentity) | |
|
dgozman
2017/06/08 19:12:00
Why don't we care anymore?
lushnikov
2017/06/08 21:14:34
Every Bindings.BreakpointManager.Breakpoint has a
| |
| 183 return; | |
| 184 var breakpoints = this._breakpointsForPrimaryUISourceCode.get(uiSourceCode) || []; | |
| 185 for (var i = 0; i < breakpoints.length; ++i) | |
| 186 breakpoints[i]._updateInDebuggerForModel(debuggerModel); | |
| 187 } | |
| 188 | |
| 189 /** | |
| 190 * @param {!Workspace.UISourceCode} uiSourceCode | 174 * @param {!Workspace.UISourceCode} uiSourceCode |
| 191 */ | 175 */ |
| 192 _removeUISourceCode(uiSourceCode) { | 176 _removeUISourceCode(uiSourceCode) { |
| 193 var breakpoints = this._breakpointsForPrimaryUISourceCode.get(uiSourceCode) || []; | 177 var breakpoints = this._breakpointsForPrimaryUISourceCode.get(uiSourceCode) || []; |
| 194 for (var i = 0; i < breakpoints.length; ++i) { | 178 for (var i = 0; i < breakpoints.length; ++i) { |
| 195 breakpoints[i]._resetLocations(); | 179 breakpoints[i]._resetLocations(); |
| 196 if (breakpoints[i].enabled()) | 180 if (breakpoints[i].enabled()) |
| 197 this._provisionalBreakpoints.set(uiSourceCode.url(), breakpoints[i]); | 181 this._provisionalBreakpoints.set(uiSourceCode.url(), breakpoints[i]); |
| 198 } | 182 } |
| 199 this._breakpointsForPrimaryUISourceCode.remove(uiSourceCode); | 183 this._breakpointsForPrimaryUISourceCode.remove(uiSourceCode); |
| (...skipping 888 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1088 this.url = breakpoint._url; | 1072 this.url = breakpoint._url; |
| 1089 this.lineNumber = breakpoint.lineNumber(); | 1073 this.lineNumber = breakpoint.lineNumber(); |
| 1090 this.columnNumber = breakpoint.columnNumber(); | 1074 this.columnNumber = breakpoint.columnNumber(); |
| 1091 this.condition = breakpoint.condition(); | 1075 this.condition = breakpoint.condition(); |
| 1092 this.enabled = breakpoint.enabled(); | 1076 this.enabled = breakpoint.enabled(); |
| 1093 } | 1077 } |
| 1094 }; | 1078 }; |
| 1095 | 1079 |
| 1096 /** @type {!Bindings.BreakpointManager} */ | 1080 /** @type {!Bindings.BreakpointManager} */ |
| 1097 Bindings.breakpointManager; | 1081 Bindings.breakpointManager; |
| OLD | NEW |