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 692 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
703 if (callbackImmediately) | 703 if (callbackImmediately) |
704 this._didRemoveFromDebugger(); | 704 this._didRemoveFromDebugger(); |
705 }, | 705 }, |
706 | 706 |
707 _updateInDebugger: function() | 707 _updateInDebugger: function() |
708 { | 708 { |
709 this._removeFromDebugger(); | 709 this._removeFromDebugger(); |
710 var uiSourceCode = this._breakpoint.uiSourceCode(); | 710 var uiSourceCode = this._breakpoint.uiSourceCode(); |
711 if (!uiSourceCode || !this._breakpoint._enabled) | 711 if (!uiSourceCode || !this._breakpoint._enabled) |
712 return; | 712 return; |
713 var scriptFile = uiSourceCode.scriptFileForTarget(this._target); | 713 var scriptFile = uiSourceCode.scriptFileForTarget(this.target()); |
714 if (scriptFile && scriptFile.hasDivergedFromVM()) | 714 if (scriptFile && scriptFile.hasDivergedFromVM()) |
715 return; | 715 return; |
716 | 716 |
717 var lineNumber = this._breakpoint._lineNumber; | 717 var lineNumber = this._breakpoint._lineNumber; |
718 var columnNumber = this._breakpoint._columnNumber; | 718 var columnNumber = this._breakpoint._columnNumber; |
719 var rawLocation = uiSourceCode.uiLocationToRawLocation(this._target, lin
eNumber, columnNumber); | 719 var rawLocation = uiSourceCode.uiLocationToRawLocation(this.target(), li
neNumber, columnNumber); |
720 var debuggerModelLocation = /** @type {!WebInspector.DebuggerModel.Locat
ion} */ (rawLocation); | 720 var debuggerModelLocation = /** @type {!WebInspector.DebuggerModel.Locat
ion} */ (rawLocation); |
721 var condition = this._breakpoint.condition(); | 721 var condition = this._breakpoint.condition(); |
722 if (debuggerModelLocation) | 722 if (debuggerModelLocation) |
723 this.target().debuggerModel.setBreakpointByScriptLocation(debuggerMo
delLocation, condition, this._didSetBreakpointInDebugger.bind(this)); | 723 this.target().debuggerModel.setBreakpointByScriptLocation(debuggerMo
delLocation, condition, this._didSetBreakpointInDebugger.bind(this)); |
724 else if (uiSourceCode.url) | 724 else if (uiSourceCode.url) |
725 this.target().debuggerModel.setBreakpointByURL(uiSourceCode.url, lin
eNumber, columnNumber, condition, this._didSetBreakpointInDebugger.bind(this)); | 725 this.target().debuggerModel.setBreakpointByURL(uiSourceCode.url, lin
eNumber, columnNumber, condition, this._didSetBreakpointInDebugger.bind(this)); |
726 }, | 726 }, |
727 | 727 |
728 /** | 728 /** |
729 * @param {?DebuggerAgent.BreakpointId} breakpointId | 729 * @param {?DebuggerAgent.BreakpointId} breakpointId |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
890 { | 890 { |
891 this.sourceFileId = breakpoint._sourceFileId; | 891 this.sourceFileId = breakpoint._sourceFileId; |
892 this.lineNumber = breakpoint.lineNumber(); | 892 this.lineNumber = breakpoint.lineNumber(); |
893 this.columnNumber = breakpoint.columnNumber(); | 893 this.columnNumber = breakpoint.columnNumber(); |
894 this.condition = breakpoint.condition(); | 894 this.condition = breakpoint.condition(); |
895 this.enabled = breakpoint.enabled(); | 895 this.enabled = breakpoint.enabled(); |
896 } | 896 } |
897 | 897 |
898 /** @type {!WebInspector.BreakpointManager} */ | 898 /** @type {!WebInspector.BreakpointManager} */ |
899 WebInspector.breakpointManager; | 899 WebInspector.breakpointManager; |
OLD | NEW |