Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 24 matching lines...) Expand all Loading... | |
| 35 * @param {number} endLine | 35 * @param {number} endLine |
| 36 * @param {number} endColumn | 36 * @param {number} endColumn |
| 37 * @param {boolean} isContentScript | 37 * @param {boolean} isContentScript |
| 38 * @param {string=} sourceMapURL | 38 * @param {string=} sourceMapURL |
| 39 * @param {boolean=} hasSourceURL | 39 * @param {boolean=} hasSourceURL |
| 40 */ | 40 */ |
| 41 WebInspector.Script = function(target, scriptId, sourceURL, startLine, startColu mn, endLine, endColumn, isContentScript, sourceMapURL, hasSourceURL) | 41 WebInspector.Script = function(target, scriptId, sourceURL, startLine, startColu mn, endLine, endColumn, isContentScript, sourceMapURL, hasSourceURL) |
| 42 { | 42 { |
| 43 WebInspector.SDKObject.call(this, target); | 43 WebInspector.SDKObject.call(this, target); |
| 44 this.scriptId = scriptId; | 44 this.scriptId = scriptId; |
| 45 this.sourceURL = sourceURL; | 45 this.scriptId = scriptId; |
|
aandrey
2014/10/30 14:50:43
duplicated line
sergeyv
2014/11/05 10:50:04
Done.
| |
| 46 if (hasSourceURL) { | |
|
vsevik
2014/10/31 09:05:34
Let's try to avoid doing this in this patch since
sergeyv
2014/11/05 10:50:04
Done.
| |
| 47 var parsedSourceURL = sourceURL.asParsedURL(); | |
| 48 if (!parsedSourceURL) { | |
| 49 var completeURL = WebInspector.ParsedURL.completeURL(target.url(), s ourceURL); | |
| 50 parsedSourceURL = completeURL ? completeURL.asParsedURL() : parsedSo urceURL; | |
| 51 } | |
| 52 this.sourceURL = parsedSourceURL ? parsedSourceURL.url : sourceURL; | |
| 53 } else { | |
| 54 this.sourceURL = sourceURL; | |
| 55 } | |
| 46 this.lineOffset = startLine; | 56 this.lineOffset = startLine; |
| 47 this.columnOffset = startColumn; | 57 this.columnOffset = startColumn; |
| 48 this.endLine = endLine; | 58 this.endLine = endLine; |
| 49 this.endColumn = endColumn; | 59 this.endColumn = endColumn; |
| 50 this._isContentScript = isContentScript; | 60 this._isContentScript = isContentScript; |
| 51 this.sourceMapURL = sourceMapURL; | 61 this.sourceMapURL = sourceMapURL; |
| 52 this.hasSourceURL = hasSourceURL; | 62 this.hasSourceURL = hasSourceURL; |
| 53 } | 63 } |
| 54 | 64 |
| 55 WebInspector.Script.Events = { | 65 WebInspector.Script.Events = { |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 250 /** | 260 /** |
| 251 * @return {boolean} | 261 * @return {boolean} |
| 252 */ | 262 */ |
| 253 isInlineScriptWithSourceURL: function() | 263 isInlineScriptWithSourceURL: function() |
| 254 { | 264 { |
| 255 return !!this.hasSourceURL && this.isInlineScript() | 265 return !!this.hasSourceURL && this.isInlineScript() |
| 256 }, | 266 }, |
| 257 | 267 |
| 258 __proto__: WebInspector.SDKObject.prototype | 268 __proto__: WebInspector.SDKObject.prototype |
| 259 } | 269 } |
| OLD | NEW |