Chromium Code Reviews| Index: Source/devtools/front_end/sdk/Script.js |
| diff --git a/Source/devtools/front_end/sdk/Script.js b/Source/devtools/front_end/sdk/Script.js |
| index babdbc4b05ceca31643fe35a3690b96551ecddf9..99495e350c10d97ddb8ffc58cc225d2c8ea793eb 100644 |
| --- a/Source/devtools/front_end/sdk/Script.js |
| +++ b/Source/devtools/front_end/sdk/Script.js |
| @@ -42,7 +42,17 @@ WebInspector.Script = function(target, scriptId, sourceURL, startLine, startColu |
| { |
| WebInspector.SDKObject.call(this, target); |
| this.scriptId = scriptId; |
| - this.sourceURL = sourceURL; |
| + this.scriptId = scriptId; |
|
aandrey
2014/10/30 14:50:43
duplicated line
sergeyv
2014/11/05 10:50:04
Done.
|
| + 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.
|
| + var parsedSourceURL = sourceURL.asParsedURL(); |
| + if (!parsedSourceURL) { |
| + var completeURL = WebInspector.ParsedURL.completeURL(target.url(), sourceURL); |
| + parsedSourceURL = completeURL ? completeURL.asParsedURL() : parsedSourceURL; |
| + } |
| + this.sourceURL = parsedSourceURL ? parsedSourceURL.url : sourceURL; |
| + } else { |
| + this.sourceURL = sourceURL; |
| + } |
| this.lineOffset = startLine; |
| this.columnOffset = startColumn; |
| this.endLine = endLine; |