Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1616)

Unified Diff: Source/devtools/front_end/sdk/Script.js

Issue 674513002: DevTools: linkify relative links in console.log(new Error().stack) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address aandrey comments Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..196d2bf431c48674edae764ed7a98267b5ac54b7 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;
+ if (hasSourceURL) {
+ var parsedSourceURL = sourceURL.asParsedURL();
+ if (!parsedSourceURL) {
+ var completeURL = WebInspector.ParsedURL.completeURL(WebInspector.targetManager.inspectedPageURL(), sourceURL);
vsevik 2014/10/27 09:04:56 ditto
sergeyv 2014/10/30 14:38:39 Done.
+ parsedSourceURL = completeURL ? completeURL.asParsedURL() : parsedSourceURL;
+ }
+ this.sourceURL = parsedSourceURL ? parsedSourceURL.url : sourceURL;
+ } else {
+ this.sourceURL = sourceURL;
+ }
this.lineOffset = startLine;
this.columnOffset = startColumn;
this.endLine = endLine;

Powered by Google App Engine
This is Rietveld 408576698