| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 if (script.isInlineScriptWithSourceURL() && !lineNumber && columnNumber) | 76 if (script.isInlineScriptWithSourceURL() && !lineNumber && columnNumber) |
| 77 columnNumber -= script.columnOffset; | 77 columnNumber -= script.columnOffset; |
| 78 return uiSourceCode.uiLocation(lineNumber, columnNumber); | 78 return uiSourceCode.uiLocation(lineNumber, columnNumber); |
| 79 } | 79 } |
| 80 | 80 |
| 81 /** | 81 /** |
| 82 * @override | 82 * @override |
| 83 * @param {!Workspace.UISourceCode} uiSourceCode | 83 * @param {!Workspace.UISourceCode} uiSourceCode |
| 84 * @param {number} lineNumber | 84 * @param {number} lineNumber |
| 85 * @param {number} columnNumber | 85 * @param {number} columnNumber |
| 86 * @return {?SDK.DebuggerModel.Location} | 86 * @return {!Array<!SDK.DebuggerModel.Location>} |
| 87 */ | 87 */ |
| 88 uiLocationToRawLocation(uiSourceCode, lineNumber, columnNumber) { | 88 uiLocationToRawLocations(uiSourceCode, lineNumber, columnNumber) { |
| 89 var scripts = this._scriptsForUISourceCode(uiSourceCode); | 89 var scripts = this._scriptsForUISourceCode(uiSourceCode); |
| 90 console.assert(scripts.length); | 90 console.assert(scripts.length); |
| 91 var script = scripts[scripts.length - 1]; | 91 var script = scripts[scripts.length - 1]; |
| 92 var location; |
| 92 if (script.isInlineScriptWithSourceURL()) { | 93 if (script.isInlineScriptWithSourceURL()) { |
| 93 return this._debuggerModel.createRawLocation( | 94 location = this._debuggerModel.createRawLocation( |
| 94 script, lineNumber + script.lineOffset, lineNumber ? columnNumber : co
lumnNumber + script.columnOffset); | 95 script, lineNumber + script.lineOffset, lineNumber ? columnNumber : co
lumnNumber + script.columnOffset); |
| 96 } else { |
| 97 location = this._debuggerModel.createRawLocation(script, lineNumber, colum
nNumber); |
| 95 } | 98 } |
| 96 return this._debuggerModel.createRawLocation(script, lineNumber, columnNumbe
r); | 99 return location ? [location] : []; |
| 97 } | 100 } |
| 98 | 101 |
| 99 /** | 102 /** |
| 100 * @param {!SDK.Script} script | 103 * @param {!SDK.Script} script |
| 101 */ | 104 */ |
| 102 addScript(script) { | 105 addScript(script) { |
| 103 if (script.isAnonymousScript()) | 106 if (script.isAnonymousScript()) |
| 104 return; | 107 return; |
| 105 this._debuggerWorkspaceBinding.pushSourceMapping(script, this); | 108 this._debuggerWorkspaceBinding.pushSourceMapping(script, this); |
| 106 | 109 |
| (...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 434 hasSourceMapURL() { | 437 hasSourceMapURL() { |
| 435 return this._script && !!this._script.sourceMapURL; | 438 return this._script && !!this._script.sourceMapURL; |
| 436 } | 439 } |
| 437 }; | 440 }; |
| 438 | 441 |
| 439 /** @enum {symbol} */ | 442 /** @enum {symbol} */ |
| 440 Bindings.ResourceScriptFile.Events = { | 443 Bindings.ResourceScriptFile.Events = { |
| 441 DidMergeToVM: Symbol('DidMergeToVM'), | 444 DidMergeToVM: Symbol('DidMergeToVM'), |
| 442 DidDivergeFromVM: Symbol('DidDivergeFromVM'), | 445 DidDivergeFromVM: Symbol('DidDivergeFromVM'), |
| 443 }; | 446 }; |
| OLD | NEW |