| 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 1550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1561 */ | 1561 */ |
| 1562 function setBreakpoint(condition, enabled, locations) { | 1562 function setBreakpoint(condition, enabled, locations) { |
| 1563 if (!locations || !locations.length) | 1563 if (!locations || !locations.length) |
| 1564 this._setBreakpoint(lineNumber, 0, condition, enabled); | 1564 this._setBreakpoint(lineNumber, 0, condition, enabled); |
| 1565 else | 1565 else |
| 1566 this._setBreakpoint(locations[0].lineNumber, locations[0].columnNumber,
condition, enabled); | 1566 this._setBreakpoint(locations[0].lineNumber, locations[0].columnNumber,
condition, enabled); |
| 1567 Host.userMetrics.actionTaken(Host.UserMetrics.Action.ScriptsBreakpointSet)
; | 1567 Host.userMetrics.actionTaken(Host.UserMetrics.Action.ScriptsBreakpointSet)
; |
| 1568 } | 1568 } |
| 1569 } | 1569 } |
| 1570 | 1570 |
| 1571 toggleBreakpointOnCurrentLine() { | 1571 /** |
| 1572 * @param {boolean} onlyDisable |
| 1573 */ |
| 1574 toggleBreakpointOnCurrentLine(onlyDisable) { |
| 1572 if (this._muted) | 1575 if (this._muted) |
| 1573 return; | 1576 return; |
| 1574 | 1577 |
| 1575 var selection = this.textEditor.selection(); | 1578 var selection = this.textEditor.selection(); |
| 1576 if (!selection) | 1579 if (!selection) |
| 1577 return; | 1580 return; |
| 1578 this._toggleBreakpoint(selection.startLine, false); | 1581 this._toggleBreakpoint(selection.startLine, onlyDisable); |
| 1579 } | 1582 } |
| 1580 | 1583 |
| 1581 /** | 1584 /** |
| 1582 * @param {number} lineNumber | 1585 * @param {number} lineNumber |
| 1583 * @param {number} columnNumber | 1586 * @param {number} columnNumber |
| 1584 * @param {string} condition | 1587 * @param {string} condition |
| 1585 * @param {boolean} enabled | 1588 * @param {boolean} enabled |
| 1586 */ | 1589 */ |
| 1587 _setBreakpoint(lineNumber, columnNumber, condition, enabled) { | 1590 _setBreakpoint(lineNumber, columnNumber, condition, enabled) { |
| 1588 if (!Bindings.CompilerScriptMapping.uiLineHasMapping(this._debuggerSourceCod
e, lineNumber)) | 1591 if (!Bindings.CompilerScriptMapping.uiLineHasMapping(this._debuggerSourceCod
e, lineNumber)) |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1684 return; | 1687 return; |
| 1685 this.bookmark.clear(); | 1688 this.bookmark.clear(); |
| 1686 this.bookmark = null; | 1689 this.bookmark = null; |
| 1687 } | 1690 } |
| 1688 }; | 1691 }; |
| 1689 | 1692 |
| 1690 Sources.JavaScriptSourceFrame.BreakpointDecoration.bookmarkSymbol = Symbol('book
mark'); | 1693 Sources.JavaScriptSourceFrame.BreakpointDecoration.bookmarkSymbol = Symbol('book
mark'); |
| 1691 Sources.JavaScriptSourceFrame.BreakpointDecoration._elementSymbolForTest = Symbo
l('element'); | 1694 Sources.JavaScriptSourceFrame.BreakpointDecoration._elementSymbolForTest = Symbo
l('element'); |
| 1692 | 1695 |
| 1693 Sources.JavaScriptSourceFrame.continueToLocationDecorationSymbol = Symbol('bookm
ark'); | 1696 Sources.JavaScriptSourceFrame.continueToLocationDecorationSymbol = Symbol('bookm
ark'); |
| OLD | NEW |