| 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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 } | 103 } |
| 104 | 104 |
| 105 /** | 105 /** |
| 106 * @param {string} fromURL | 106 * @param {string} fromURL |
| 107 * @param {!Workspace.UISourceCode} toSourceCode | 107 * @param {!Workspace.UISourceCode} toSourceCode |
| 108 */ | 108 */ |
| 109 copyBreakpoints(fromURL, toSourceCode) { | 109 copyBreakpoints(fromURL, toSourceCode) { |
| 110 var breakpointItems = this._storage.breakpointItems(fromURL); | 110 var breakpointItems = this._storage.breakpointItems(fromURL); |
| 111 for (var item of breakpointItems) | 111 for (var item of breakpointItems) |
| 112 this.setBreakpoint(toSourceCode, item.lineNumber, item.columnNumber, item.
condition, item.enabled); | 112 this.setBreakpoint(toSourceCode, item.lineNumber, item.columnNumber, item.
condition, item.enabled); |
| 113 // Since we can not have two provisional breakpoints which point to the same
url, remove one of them. |
| 114 if (fromURL === toSourceCode.url()) { |
| 115 var provisionalBreakpoints = this._provisionalBreakpointsForURL(fromURL); |
| 116 for (var breakpoint of provisionalBreakpoints.values()) |
| 117 breakpoint.remove(); |
| 118 } |
| 113 } | 119 } |
| 114 | 120 |
| 115 removeProvisionalBreakpointsForTest() { | 121 removeProvisionalBreakpointsForTest() { |
| 116 var breakpoints = this._provisionalBreakpoints.valuesArray(); | 122 var breakpoints = this._provisionalBreakpoints.valuesArray(); |
| 117 for (var i = 0; i < breakpoints.length; ++i) | 123 for (var i = 0; i < breakpoints.length; ++i) |
| 118 breakpoints[i].remove(); | 124 breakpoints[i].remove(); |
| 119 this._provisionalBreakpoints.clear(); | 125 this._provisionalBreakpoints.clear(); |
| 120 } | 126 } |
| 121 | 127 |
| 122 /** | 128 /** |
| (...skipping 957 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1080 this.url = breakpoint._url; | 1086 this.url = breakpoint._url; |
| 1081 this.lineNumber = breakpoint.lineNumber(); | 1087 this.lineNumber = breakpoint.lineNumber(); |
| 1082 this.columnNumber = breakpoint.columnNumber(); | 1088 this.columnNumber = breakpoint.columnNumber(); |
| 1083 this.condition = breakpoint.condition(); | 1089 this.condition = breakpoint.condition(); |
| 1084 this.enabled = breakpoint.enabled(); | 1090 this.enabled = breakpoint.enabled(); |
| 1085 } | 1091 } |
| 1086 }; | 1092 }; |
| 1087 | 1093 |
| 1088 /** @type {!Bindings.BreakpointManager} */ | 1094 /** @type {!Bindings.BreakpointManager} */ |
| 1089 Bindings.breakpointManager; | 1095 Bindings.breakpointManager; |
| OLD | NEW |