Changeset 146903 in webkit


Ignore:
Timestamp:
Mar 26, 2013 10:22:13 AM (11 years ago)
Author:
vsevik@chromium.org
Message:

Web Inspector: Distinguish breakpoints and breakpoint locations in BreakpointManager API
https://bugs.webkit.org/show_bug.cgi?id=113311

Reviewed by Pavel Feldman.

Source/WebCore:

Made independent handling of breakpoints and breakpoint location in breakpoint manager consistent.
JavaScriptSourceFrame now removes breakpoints originally set in it based on primary UI location.

  • inspector/front-end/BreakpointManager.js:

(WebInspector.BreakpointManager.prototype.breakpointsForUISourceCode):
(WebInspector.BreakpointManager.prototype.allBreakpoints):
(WebInspector.BreakpointManager.prototype.breakpointLocationsForUISourceCode):
(WebInspector.BreakpointManager.prototype.allBreakpointLocations):
(WebInspector.BreakpointManager.prototype._projectWillReset.get for):
(WebInspector.BreakpointManager.prototype._projectWillReset):

  • inspector/front-end/JavaScriptSourceFrame.js:

(WebInspector.JavaScriptSourceFrame.prototype.onUISourceCodeContentChanged):
(WebInspector.JavaScriptSourceFrame.prototype._restoreBreakpointsAfterEditing):
(WebInspector.JavaScriptSourceFrame.prototype._removeAllBreakpoints):

LayoutTests:

  • inspector/debugger/live-edit-breakpoints-expected.txt:
  • inspector/debugger/live-edit-breakpoints.html:
Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r146901 r146903  
     12013-03-26  Vsevolod Vlasov  <vsevik@chromium.org>
     2
     3        Web Inspector: Distinguish breakpoints and breakpoint locations in BreakpointManager API
     4        https://bugs.webkit.org/show_bug.cgi?id=113311
     5
     6        Reviewed by Pavel Feldman.
     7
     8        * inspector/debugger/live-edit-breakpoints-expected.txt:
     9        * inspector/debugger/live-edit-breakpoints.html:
     10
    1112013-03-26  Dmitry Zvorygin  <zvorygin@chromium.org>
    212
  • trunk/LayoutTests/inspector/debugger/live-edit-breakpoints-expected.txt

    r146191 r146903  
    1111    Dumping breakpoint locations
    1212        url: edit-me-breakpoints.js, lineNumber: 2, project type: network, project id: file://
    13 Editing source:
    14     TextEditor.removeBreakpoint(lineNumber = 2)
    15     TextEditor.addBreakpoint(lineNumber = 2, disabled = true)
    16     OriginalTextEditor.addBreakpoint(lineNumber = 2, disabled = false)
    17     Dumping breakpoint storage
    18         edit-me-breakpoints.js:2, enabled:true
    19     Dumping breakpoint locations
    20         url: edit-me-breakpoints.js, lineNumber: 2, project type: debugger, project id: debugger:
    21 Undoing source editing:
    22     OriginalTextEditor.removeBreakpoint(lineNumber = 2)
    23     TextEditor.removeBreakpoint(lineNumber = 2)
    24     TextEditor.removeBreakpoint(lineNumber = 2)
    25     TextEditor.addBreakpoint(lineNumber = 2, disabled = false)
    26     Dumping breakpoint storage
    27         edit-me-breakpoints.js:2, enabled:true
    28     Dumping breakpoint locations
    29         url: edit-me-breakpoints.js, lineNumber: 2, project type: network, project id: file://
    30 Finally removing breakpoint:
    31     TextEditor.removeBreakpoint(lineNumber = 2)
    32     Dumping breakpoint storage
    33     Dumping breakpoint locations
     13    Dumping breakpoints
     14        url: edit-me-breakpoints.js, lineNumber: 2, project type: network, project id: file://
     15Editing source:
     16    TextEditor.removeBreakpoint(lineNumber = 2)
     17    TextEditor.addBreakpoint(lineNumber = 2, disabled = true)
     18    OriginalTextEditor.addBreakpoint(lineNumber = 2, disabled = false)
     19    Dumping breakpoint storage
     20        edit-me-breakpoints.js:2, enabled:true
     21    Dumping breakpoint locations
     22        url: edit-me-breakpoints.js, lineNumber: 2, project type: debugger, project id: debugger:
     23    Dumping breakpoints
     24        url: edit-me-breakpoints.js, lineNumber: 2, project type: network, project id: file://
     25Undoing source editing:
     26    OriginalTextEditor.removeBreakpoint(lineNumber = 2)
     27    TextEditor.removeBreakpoint(lineNumber = 2)
     28    TextEditor.removeBreakpoint(lineNumber = 2)
     29    TextEditor.addBreakpoint(lineNumber = 2, disabled = false)
     30    Dumping breakpoint storage
     31        edit-me-breakpoints.js:2, enabled:true
     32    Dumping breakpoint locations
     33        url: edit-me-breakpoints.js, lineNumber: 2, project type: network, project id: file://
     34    Dumping breakpoints
     35        url: edit-me-breakpoints.js, lineNumber: 2, project type: network, project id: file://
     36Finally removing breakpoint:
     37    TextEditor.removeBreakpoint(lineNumber = 2)
     38    Dumping breakpoint storage
     39    Dumping breakpoint locations
     40    Dumping breakpoints
    3441
    3542Running: testEditCommit
     
    4047    Dumping breakpoint locations
    4148        url: edit-me-breakpoints.js, lineNumber: 2, project type: network, project id: file://
    42 Editing source:
    43     OriginalTextEditor.addBreakpoint(lineNumber = 2, disabled = false)
    44     TextEditor.removeBreakpoint(lineNumber = 2)
    45     TextEditor.addBreakpoint(lineNumber = 2, disabled = true)
    46     Dumping breakpoint storage
    47         edit-me-breakpoints.js:2, enabled:true
    48     Dumping breakpoint locations
    49         url: edit-me-breakpoints.js, lineNumber: 2, project type: debugger, project id: debugger:
     49    Dumping breakpoints
     50        url: edit-me-breakpoints.js, lineNumber: 2, project type: network, project id: file://
     51Editing source:
     52    OriginalTextEditor.addBreakpoint(lineNumber = 2, disabled = false)
     53    TextEditor.removeBreakpoint(lineNumber = 2)
     54    TextEditor.addBreakpoint(lineNumber = 2, disabled = true)
     55    Dumping breakpoint storage
     56        edit-me-breakpoints.js:2, enabled:true
     57    Dumping breakpoint locations
     58        url: edit-me-breakpoints.js, lineNumber: 2, project type: debugger, project id: debugger:
     59    Dumping breakpoints
     60        url: edit-me-breakpoints.js, lineNumber: 2, project type: network, project id: file://
    5061Committing edited source:
    5162    OriginalTextEditor.removeBreakpoint(lineNumber = 2)
     
    5768    Dumping breakpoint locations
    5869        url: edit-me-breakpoints.js, lineNumber: 2, project type: network, project id: file://
    59 Finally removing breakpoint:
    60     TextEditor.removeBreakpoint(lineNumber = 2)
    61     Dumping breakpoint storage
    62     Dumping breakpoint locations
     70    Dumping breakpoints
     71        url: edit-me-breakpoints.js, lineNumber: 2, project type: network, project id: file://
     72Finally removing breakpoint:
     73    TextEditor.removeBreakpoint(lineNumber = 2)
     74    Dumping breakpoint storage
     75    Dumping breakpoint locations
     76    Dumping breakpoints
    6377
    6478Running: testEditCommitFailEditCommit
     
    6983    Dumping breakpoint locations
    7084        url: edit-me-breakpoints.js, lineNumber: 2, project type: network, project id: file://
    71 Editing source:
    72     OriginalTextEditor.addBreakpoint(lineNumber = 2, disabled = false)
    73     TextEditor.removeBreakpoint(lineNumber = 2)
    74     TextEditor.addBreakpoint(lineNumber = 2, disabled = true)
    75     Dumping breakpoint storage
    76         edit-me-breakpoints.js:2, enabled:true
    77     Dumping breakpoint locations
    78         url: edit-me-breakpoints.js, lineNumber: 2, project type: debugger, project id: debugger:
     85    Dumping breakpoints
     86        url: edit-me-breakpoints.js, lineNumber: 2, project type: network, project id: file://
     87Editing source:
     88    OriginalTextEditor.addBreakpoint(lineNumber = 2, disabled = false)
     89    TextEditor.removeBreakpoint(lineNumber = 2)
     90    TextEditor.addBreakpoint(lineNumber = 2, disabled = true)
     91    Dumping breakpoint storage
     92        edit-me-breakpoints.js:2, enabled:true
     93    Dumping breakpoint locations
     94        url: edit-me-breakpoints.js, lineNumber: 2, project type: debugger, project id: debugger:
     95    Dumping breakpoints
     96        url: edit-me-breakpoints.js, lineNumber: 2, project type: network, project id: file://
    7997Committing edited source:
    8098    Dumping breakpoint storage
     
    82100    Dumping breakpoint locations
    83101        url: edit-me-breakpoints.js, lineNumber: 2, project type: debugger, project id: debugger:
     102    Dumping breakpoints
     103        url: edit-me-breakpoints.js, lineNumber: 2, project type: network, project id: file://
    84104Editing source again so that live edit could succeed:
    85105    Dumping breakpoint storage
     
    87107    Dumping breakpoint locations
    88108        url: edit-me-breakpoints.js, lineNumber: 2, project type: debugger, project id: debugger:
     109    Dumping breakpoints
     110        url: edit-me-breakpoints.js, lineNumber: 2, project type: network, project id: file://
    89111Committing edited source again:
    90112    OriginalTextEditor.removeBreakpoint(lineNumber = 2)
     
    96118    Dumping breakpoint locations
    97119        url: edit-me-breakpoints.js, lineNumber: 2, project type: network, project id: file://
    98 Finally removing breakpoint:
    99     TextEditor.removeBreakpoint(lineNumber = 2)
    100     Dumping breakpoint storage
    101     Dumping breakpoint locations
     120    Dumping breakpoints
     121        url: edit-me-breakpoints.js, lineNumber: 2, project type: network, project id: file://
     122Finally removing breakpoint:
     123    TextEditor.removeBreakpoint(lineNumber = 2)
     124    Dumping breakpoint storage
     125    Dumping breakpoint locations
     126    Dumping breakpoints
    102127
    103128Running: testEditCommitFailUndoCommit
     
    108133    Dumping breakpoint locations
    109134        url: edit-me-breakpoints.js, lineNumber: 2, project type: network, project id: file://
    110 Editing source:
    111     OriginalTextEditor.addBreakpoint(lineNumber = 2, disabled = false)
    112     TextEditor.removeBreakpoint(lineNumber = 2)
    113     TextEditor.addBreakpoint(lineNumber = 2, disabled = true)
    114     Dumping breakpoint storage
    115         edit-me-breakpoints.js:2, enabled:true
    116     Dumping breakpoint locations
    117         url: edit-me-breakpoints.js, lineNumber: 2, project type: debugger, project id: debugger:
     135    Dumping breakpoints
     136        url: edit-me-breakpoints.js, lineNumber: 2, project type: network, project id: file://
     137Editing source:
     138    OriginalTextEditor.addBreakpoint(lineNumber = 2, disabled = false)
     139    TextEditor.removeBreakpoint(lineNumber = 2)
     140    TextEditor.addBreakpoint(lineNumber = 2, disabled = true)
     141    Dumping breakpoint storage
     142        edit-me-breakpoints.js:2, enabled:true
     143    Dumping breakpoint locations
     144        url: edit-me-breakpoints.js, lineNumber: 2, project type: debugger, project id: debugger:
     145    Dumping breakpoints
     146        url: edit-me-breakpoints.js, lineNumber: 2, project type: network, project id: file://
    118147Committing edited source:
    119148    Dumping breakpoint storage
     
    121150    Dumping breakpoint locations
    122151        url: edit-me-breakpoints.js, lineNumber: 2, project type: debugger, project id: debugger:
    123 Undoing source editing:
    124     Dumping breakpoint storage
    125         edit-me-breakpoints.js:2, enabled:true
    126     Dumping breakpoint locations
    127         url: edit-me-breakpoints.js, lineNumber: 2, project type: debugger, project id: debugger:
     152    Dumping breakpoints
     153        url: edit-me-breakpoints.js, lineNumber: 2, project type: network, project id: file://
     154Undoing source editing:
     155    Dumping breakpoint storage
     156        edit-me-breakpoints.js:2, enabled:true
     157    Dumping breakpoint locations
     158        url: edit-me-breakpoints.js, lineNumber: 2, project type: debugger, project id: debugger:
     159    Dumping breakpoints
     160        url: edit-me-breakpoints.js, lineNumber: 2, project type: network, project id: file://
    128161Committing edited source again:
    129162    OriginalTextEditor.removeBreakpoint(lineNumber = 2)
     
    135168    Dumping breakpoint locations
    136169        url: edit-me-breakpoints.js, lineNumber: 2, project type: network, project id: file://
    137 Finally removing breakpoint:
    138     TextEditor.removeBreakpoint(lineNumber = 2)
    139     Dumping breakpoint storage
    140     Dumping breakpoint locations
     170    Dumping breakpoints
     171        url: edit-me-breakpoints.js, lineNumber: 2, project type: network, project id: file://
     172Finally removing breakpoint:
     173    TextEditor.removeBreakpoint(lineNumber = 2)
     174    Dumping breakpoint storage
     175    Dumping breakpoint locations
     176    Dumping breakpoints
    141177
    142178Running: testEditAnonymousUndo
     
    150186    Dumping breakpoint locations
    151187        url: , lineNumber: 2, project type: debugger, project id: debugger:
    152 Editing source:
    153     Dumping breakpoint storage
    154     Dumping breakpoint locations
    155         url: , lineNumber: 2, project type: debugger, project id: debugger:
    156 Undoing source editing:
    157     Dumping breakpoint storage
    158     Dumping breakpoint locations
    159         url: , lineNumber: 2, project type: debugger, project id: debugger:
    160 Finally removing breakpoint:
    161     TextEditor.removeBreakpoint(lineNumber = 2)
    162     Dumping breakpoint storage
    163     Dumping breakpoint locations
     188    Dumping breakpoints
     189        url: , lineNumber: 2, project type: debugger, project id: debugger:
     190Editing source:
     191    Dumping breakpoint storage
     192    Dumping breakpoint locations
     193        url: , lineNumber: 2, project type: debugger, project id: debugger:
     194    Dumping breakpoints
     195        url: , lineNumber: 2, project type: debugger, project id: debugger:
     196Undoing source editing:
     197    Dumping breakpoint storage
     198    Dumping breakpoint locations
     199        url: , lineNumber: 2, project type: debugger, project id: debugger:
     200    Dumping breakpoints
     201        url: , lineNumber: 2, project type: debugger, project id: debugger:
     202Finally removing breakpoint:
     203    TextEditor.removeBreakpoint(lineNumber = 2)
     204    Dumping breakpoint storage
     205    Dumping breakpoint locations
     206    Dumping breakpoints
    164207
    165208Running: testEditDynamicAnonymousUndo
     
    173216    Dumping breakpoint locations
    174217        url: , lineNumber: 2, project type: debugger, project id: debugger:
    175 Editing source:
    176     Dumping breakpoint storage
    177     Dumping breakpoint locations
    178         url: , lineNumber: 2, project type: debugger, project id: debugger:
    179 Undoing source editing:
    180     Dumping breakpoint storage
    181     Dumping breakpoint locations
    182         url: , lineNumber: 2, project type: debugger, project id: debugger:
    183 Finally removing breakpoint:
    184     TextEditor.removeBreakpoint(lineNumber = 2)
    185     Dumping breakpoint storage
    186     Dumping breakpoint locations
     218    Dumping breakpoints
     219        url: , lineNumber: 2, project type: debugger, project id: debugger:
     220Editing source:
     221    Dumping breakpoint storage
     222    Dumping breakpoint locations
     223        url: , lineNumber: 2, project type: debugger, project id: debugger:
     224    Dumping breakpoints
     225        url: , lineNumber: 2, project type: debugger, project id: debugger:
     226Undoing source editing:
     227    Dumping breakpoint storage
     228    Dumping breakpoint locations
     229        url: , lineNumber: 2, project type: debugger, project id: debugger:
     230    Dumping breakpoints
     231        url: , lineNumber: 2, project type: debugger, project id: debugger:
     232Finally removing breakpoint:
     233    TextEditor.removeBreakpoint(lineNumber = 2)
     234    Dumping breakpoint storage
     235    Dumping breakpoint locations
     236    Dumping breakpoints
    187237Debugger was disabled.
    188238
  • trunk/LayoutTests/inspector/debugger/live-edit-breakpoints.html

    r143202 r146903  
    4040            var uiLocation = locations[i].uiLocation;
    4141            var uiSourceCode = uiLocation.uiSourceCode;
     42            var originURL = uiSourceCode.originURL();
     43            var lineNumber = uiLocation.lineNumber;
    4244            var project = uiSourceCode.project();
    43             InspectorTest.addResult("        url: " + pathToFileName(uiSourceCode.originURL()) + ", lineNumber: " + uiLocation.lineNumber + ", project type: " + project.type() + ", project id: " + project.id());
     45            InspectorTest.addResult("        url: " + pathToFileName(originURL) + ", lineNumber: " + lineNumber + ", project type: " + project.type() + ", project id: " + project.id());
     46        }
     47
     48        breakpoints = breakpointManager.allBreakpoints();
     49        InspectorTest.addResult("    Dumping breakpoints");
     50        for (var i = 0; i < breakpoints.length; ++i) {
     51            var breakpoint = breakpoints[i];
     52            var primaryUILocation = breakpoint.primaryUILocation();
     53            var uiSourceCode = primaryUILocation.uiSourceCode;
     54            var originURL = uiSourceCode.originURL();
     55            var lineNumber = primaryUILocation.lineNumber;
     56            var project = uiSourceCode.project();
     57            InspectorTest.addResult("        url: " + pathToFileName(originURL) + ", lineNumber: " + lineNumber + ", project type: " + project.type() + ", project id: " + project.id());
    4458        }
    4559    }
  • trunk/Source/WebCore/ChangeLog

    r146901 r146903  
     12013-03-26  Vsevolod Vlasov  <vsevik@chromium.org>
     2
     3        Web Inspector: Distinguish breakpoints and breakpoint locations in BreakpointManager API
     4        https://bugs.webkit.org/show_bug.cgi?id=113311
     5
     6        Reviewed by Pavel Feldman.
     7
     8        Made independent handling of breakpoints and breakpoint location in breakpoint manager consistent.
     9        JavaScriptSourceFrame now removes breakpoints originally set in it based on primary UI location.
     10
     11        * inspector/front-end/BreakpointManager.js:
     12        (WebInspector.BreakpointManager.prototype.breakpointsForUISourceCode):
     13        (WebInspector.BreakpointManager.prototype.allBreakpoints):
     14        (WebInspector.BreakpointManager.prototype.breakpointLocationsForUISourceCode):
     15        (WebInspector.BreakpointManager.prototype.allBreakpointLocations):
     16        (WebInspector.BreakpointManager.prototype._projectWillReset.get for):
     17        (WebInspector.BreakpointManager.prototype._projectWillReset):
     18        * inspector/front-end/JavaScriptSourceFrame.js:
     19        (WebInspector.JavaScriptSourceFrame.prototype.onUISourceCodeContentChanged):
     20        (WebInspector.JavaScriptSourceFrame.prototype._restoreBreakpointsAfterEditing):
     21        (WebInspector.JavaScriptSourceFrame.prototype._removeAllBreakpoints):
     22
    1232013-03-26  Dmitry Zvorygin  <zvorygin@chromium.org>
    224
  • trunk/Source/WebCore/inspector/front-end/BreakpointManager.js

    r146898 r146903  
    161161
    162162    /**
    163      * @param {function(WebInspector.BreakpointManager.Breakpoint, WebInspector.UILocation)} filter
    164      * @return {Array.<{breakpoint: WebInspector.BreakpointManager.Breakpoint, uiLocation: WebInspector.UILocation}>}
    165      */
    166     _filteredBreakpointLocations: function(filter)
     163     * @param {WebInspector.UISourceCode} uiSourceCode
     164     * @return {Array.<WebInspector.BreakpointManager.Breakpoint>}
     165     */
     166    breakpointsForUISourceCode: function(uiSourceCode)
    167167    {
    168168        var result = [];
     
    170170        for (var i = 0; i < breakpoints.length; ++i) {
    171171            var breakpoint = breakpoints[i];
    172             for (var stringifiedLocation in breakpoint._uiLocations) {
    173                 var uiLocation = breakpoint._uiLocations[stringifiedLocation];
    174                 if (filter(breakpoint, uiLocation))
    175                     result.push({breakpoint: breakpoint, uiLocation: uiLocation});
    176             }
     172            var uiLocation = breakpoint._primaryUILocation;
     173            if (uiLocation.uiSourceCode === uiSourceCode)
     174                result.push(breakpoint);
    177175        }
    178176        return result;
     177    },
     178
     179    /**
     180     * @return {Array.<WebInspector.BreakpointManager.Breakpoint>}
     181     */
     182    allBreakpoints: function()
     183    {
     184        var result = [];
     185        var breakpoints = /** @type {Array.<WebInspector.BreakpointManager.Breakpoint>} */(this._breakpoints.keys());
     186        return breakpoints;
    179187    },
    180188
     
    185193    breakpointLocationsForUISourceCode: function(uiSourceCode)
    186194    {
    187         function filter(breakpoint, uiLocation)
    188         {
    189             return uiLocation.uiSourceCode === uiSourceCode;
    190         }
    191 
    192         return this._filteredBreakpointLocations(filter);
     195        var result = [];
     196        var breakpoints = /** @type {Array.<WebInspector.BreakpointManager.Breakpoint>} */(this._breakpoints.keys());
     197        for (var i = 0; i < breakpoints.length; ++i) {
     198            var breakpoint = breakpoints[i];
     199            var uiLocations = Object.values(breakpoint._uiLocations);
     200            for (var j = 0; j < uiLocations.length; ++j) {
     201                var uiLocation = uiLocations[j];
     202                if (uiLocation.uiSourceCode === uiSourceCode)
     203                    result.push({breakpoint: breakpoint, uiLocation: uiLocations[j]});
     204            }
     205        }
     206        return result;
    193207    },
    194208
     
    198212    allBreakpointLocations: function()
    199213    {
    200         return this._filteredBreakpointLocations(function(breakpoint, uiLocation) { return true; });
     214        var result = [];
     215        var breakpoints = /** @type {Array.<WebInspector.BreakpointManager.Breakpoint>} */(this._breakpoints.keys());
     216        for (var i = 0; i < breakpoints.length; ++i) {
     217            var breakpoint = breakpoints[i];
     218            var uiLocations = Object.values(breakpoint._uiLocations);
     219            for (var j = 0; j < uiLocations.length; ++j)
     220                result.push({breakpoint: breakpoint, uiLocation: uiLocations[j]});
     221        }
     222        return result;
    201223    },
    202224
     
    246268                for (var j = 0; j < lineBreakpoints.length; ++j) {
    247269                    var breakpoint = lineBreakpoints[j];
    248                     this._breakpoints.remove(breakpoint);
    249                     delete breakpoint._primaryUILocation;
    250270                    breakpoint._resetLocations();
    251271                }
    252272            }
    253273            this._breakpointsForUISourceCode.remove(uiSourceCode);
     274
     275            var breakpoints = this.breakpointsForUISourceCode(uiSourceCode);
     276            for (var j = 0; j < breakpoints.length; ++j) {
     277                this._breakpoints.remove(breakpoints[j]);
     278                delete breakpoint._primaryUILocation;
     279            }
     280
    254281            var sourceFileId = WebInspector.BreakpointManager.sourceFileId(uiSourceCode);
    255282            delete this._sourceFilesWithRestoredBreakpoints[sourceFileId];
  • trunk/Source/WebCore/inspector/front-end/JavaScriptSourceFrame.js

    r146769 r146903  
    8181    onUISourceCodeContentChanged: function(content, contentEncoded, mimeType)
    8282    {
    83         var breakpointLocations = this._breakpointManager.breakpointLocationsForUISourceCode(this._uiSourceCode);
    84         for (var i = 0; i < breakpointLocations.length; ++i)
    85             breakpointLocations[i].breakpoint.remove();
     83        this._removeAllBreakpoints();
    8684        WebInspector.UISourceCodeFrame.prototype.onUISourceCodeContentChanged.call(this, content);
    8785    },
     
    191189
    192190        // Remove all breakpoints.
    193         var breakpointLocations = this._breakpointManager.breakpointLocationsForUISourceCode(this._uiSourceCode);
    194         var lineNumbers = {};
    195         for (var i = 0; i < breakpointLocations.length; ++i) {
    196             var breakpoint = breakpointLocations[i].breakpoint;
    197             breakpointLocations[i].breakpoint.remove();
    198         }
     191        this._removeAllBreakpoints();
    199192
    200193        // Restore all breakpoints from saved decorations.
     
    206199            this._setBreakpoint(lineNumber, breakpointDecoration.condition, breakpointDecoration.enabled);
    207200        }
     201    },
     202
     203    _removeAllBreakpoints: function()
     204    {
     205        var breakpoints = this._breakpointManager.breakpointsForUISourceCode(this._uiSourceCode);
     206        for (var i = 0; i < breakpoints.length; ++i)
     207            breakpoints[i].remove();
    208208    },
    209209
Note: See TracChangeset for help on using the changeset viewer.