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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 this._removeUISourceCode(uiSourceCode); | 148 this._removeUISourceCode(uiSourceCode); |
149 }, | 149 }, |
150 | 150 |
151 /** | 151 /** |
152 * @param {!WebInspector.Event} event | 152 * @param {!WebInspector.Event} event |
153 */ | 153 */ |
154 _uiSourceCodeMappingChanged: function(event) | 154 _uiSourceCodeMappingChanged: function(event) |
155 { | 155 { |
156 var uiSourceCode = /** @type {!WebInspector.UISourceCode} */ (event.targ
et); | 156 var uiSourceCode = /** @type {!WebInspector.UISourceCode} */ (event.targ
et); |
157 var isIdentity = /** @type {boolean} */ (event.data.isIdentity); | 157 var isIdentity = /** @type {boolean} */ (event.data.isIdentity); |
| 158 var target = /** @type {!WebInspector.Target} */ (event.data.target); |
158 if (isIdentity) | 159 if (isIdentity) |
159 return; | 160 return; |
160 var breakpoints = this._breakpointsForPrimaryUISourceCode.get(uiSourceCo
de) || []; | 161 var breakpoints = this._breakpointsForPrimaryUISourceCode.get(uiSourceCo
de) || []; |
161 for (var i = 0; i < breakpoints.length; ++i) | 162 for (var i = 0; i < breakpoints.length; ++i) |
162 breakpoints[i]._updateInDebugger(); | 163 breakpoints[i]._updateInDebuggerForTarget(target); |
163 }, | 164 }, |
164 | 165 |
165 /** | 166 /** |
166 * @param {!WebInspector.UISourceCode} uiSourceCode | 167 * @param {!WebInspector.UISourceCode} uiSourceCode |
167 */ | 168 */ |
168 _removeUISourceCode: function(uiSourceCode) | 169 _removeUISourceCode: function(uiSourceCode) |
169 { | 170 { |
170 var breakpoints = this._breakpointsForPrimaryUISourceCode.get(uiSourceCo
de) || []; | 171 var breakpoints = this._breakpointsForPrimaryUISourceCode.get(uiSourceCo
de) || []; |
171 var sourceFileId = WebInspector.BreakpointManager._sourceFileId(uiSource
Code); | 172 var sourceFileId = WebInspector.BreakpointManager._sourceFileId(uiSource
Code); |
172 for (var i = 0; i < breakpoints.length; ++i) { | 173 for (var i = 0; i < breakpoints.length; ++i) { |
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
577 this._enabled = enabled; | 578 this._enabled = enabled; |
578 this._condition = condition; | 579 this._condition = condition; |
579 this._breakpointManager._storage._updateBreakpoint(this); | 580 this._breakpointManager._storage._updateBreakpoint(this); |
580 this._updateBreakpoint(); | 581 this._updateBreakpoint(); |
581 }, | 582 }, |
582 | 583 |
583 _updateBreakpoint: function() | 584 _updateBreakpoint: function() |
584 { | 585 { |
585 this._removeFakeBreakpointAtPrimaryLocation(); | 586 this._removeFakeBreakpointAtPrimaryLocation(); |
586 this._fakeBreakpointAtPrimaryLocation(); | 587 this._fakeBreakpointAtPrimaryLocation(); |
587 this._updateInDebugger(); | 588 var targetBreakpoints = this._targetBreakpoints.values(); |
| 589 for (var i = 0; i < targetBreakpoints.length; ++i) |
| 590 targetBreakpoints[i]._updateInDebugger(); |
588 }, | 591 }, |
589 | 592 |
590 /** | 593 /** |
591 * @param {boolean=} keepInStorage | 594 * @param {boolean=} keepInStorage |
592 */ | 595 */ |
593 remove: function(keepInStorage) | 596 remove: function(keepInStorage) |
594 { | 597 { |
595 this._isRemoved = true; | 598 this._isRemoved = true; |
596 var removeFromStorage = !keepInStorage; | 599 var removeFromStorage = !keepInStorage; |
597 this._removeFakeBreakpointAtPrimaryLocation(); | 600 this._removeFakeBreakpointAtPrimaryLocation(); |
598 var targetBreakpoints = this._targetBreakpoints.values(); | 601 var targetBreakpoints = this._targetBreakpoints.values(); |
599 for (var i = 0; i < targetBreakpoints.length; ++i) { | 602 for (var i = 0; i < targetBreakpoints.length; ++i) { |
600 targetBreakpoints[i]._removeFromDebugger(); | 603 targetBreakpoints[i]._removeFromDebugger(); |
601 targetBreakpoints[i]._removeEventListeners(); | 604 targetBreakpoints[i]._removeEventListeners(); |
602 } | 605 } |
603 | 606 |
604 this._breakpointManager._removeBreakpoint(this, removeFromStorage); | 607 this._breakpointManager._removeBreakpoint(this, removeFromStorage); |
605 this._breakpointManager._targetManager.unobserveTargets(this); | 608 this._breakpointManager._targetManager.unobserveTargets(this); |
606 }, | 609 }, |
607 | 610 |
608 _updateInDebugger: function() | 611 /** |
| 612 * @param {!WebInspector.Target} target |
| 613 */ |
| 614 _updateInDebuggerForTarget: function(target) |
609 { | 615 { |
610 var targetBreakpoints = this._targetBreakpoints.values(); | 616 this._targetBreakpoints.get(target)._updateInDebugger(); |
611 for (var i = 0; i < targetBreakpoints.length; ++i) | |
612 targetBreakpoints[i]._updateInDebugger(); | |
613 }, | 617 }, |
614 | 618 |
615 /** | 619 /** |
616 * @return {string} | 620 * @return {string} |
617 */ | 621 */ |
618 _breakpointStorageId: function() | 622 _breakpointStorageId: function() |
619 { | 623 { |
620 return WebInspector.BreakpointManager._breakpointStorageId(this._sourceF
ileId, this._lineNumber, this._columnNumber); | 624 return WebInspector.BreakpointManager._breakpointStorageId(this._sourceF
ileId, this._lineNumber, this._columnNumber); |
621 }, | 625 }, |
622 | 626 |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
886 { | 890 { |
887 this.sourceFileId = breakpoint._sourceFileId; | 891 this.sourceFileId = breakpoint._sourceFileId; |
888 this.lineNumber = breakpoint.lineNumber(); | 892 this.lineNumber = breakpoint.lineNumber(); |
889 this.columnNumber = breakpoint.columnNumber(); | 893 this.columnNumber = breakpoint.columnNumber(); |
890 this.condition = breakpoint.condition(); | 894 this.condition = breakpoint.condition(); |
891 this.enabled = breakpoint.enabled(); | 895 this.enabled = breakpoint.enabled(); |
892 } | 896 } |
893 | 897 |
894 /** @type {!WebInspector.BreakpointManager} */ | 898 /** @type {!WebInspector.BreakpointManager} */ |
895 WebInspector.breakpointManager; | 899 WebInspector.breakpointManager; |
OLD | NEW |