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

Unified Diff: Source/devtools/front_end/ResourceScriptMapping.js

Issue 15832007: DevTools: Add support for //# sourceURL (sourceMappingURL) comments and deprecate //@ ones (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebaselined Created 7 years, 6 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
« no previous file with comments | « Source/devtools/front_end/ConsoleMessage.js ('k') | Source/devtools/front_end/ScriptSnippetModel.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/ResourceScriptMapping.js
diff --git a/Source/devtools/front_end/ResourceScriptMapping.js b/Source/devtools/front_end/ResourceScriptMapping.js
index 6d1ceb421a233ca1c3bd64fad1a3e185b5e71b73..6567366651f4a0d777ff041e2d4866e4274d31a5 100644
--- a/Source/devtools/front_end/ResourceScriptMapping.js
+++ b/Source/devtools/front_end/ResourceScriptMapping.js
@@ -307,7 +307,7 @@ WebInspector.ResourceScriptFile.prototype = {
return;
var source = this._uiSourceCode.workingCopy();
if (this._script.hasSourceURL && !this._sourceEndsWithSourceURL(source))
- source += "\n //@ sourceURL=" + this._script.sourceURL;
+ source += "\n //# sourceURL=" + this._script.sourceURL;
WebInspector.debuggerModel.setScriptSource(this._script.scriptId, source, innerCallback.bind(this));
},
@@ -337,7 +337,7 @@ WebInspector.ResourceScriptFile.prototype = {
if (!scriptSource.startsWith(source))
return false;
var scriptSourceTail = scriptSource.substr(source.length).trim();
- return !scriptSourceTail || !!scriptSourceTail.match(/^\/\/@\ssourceURL=\s*(\S*?)\s*$/m);
+ return !scriptSourceTail || !!scriptSourceTail.match(/^\/\/[@#]\ssourceURL=\s*(\S*?)\s*$/m);
},
/**
@@ -346,7 +346,7 @@ WebInspector.ResourceScriptFile.prototype = {
*/
_sourceEndsWithSourceURL: function(source)
{
- return !!source.match(/\/\/@\ssourceURL=\s*(\S*?)\s*$/m);
+ return !!source.match(/\/\/[@#]\ssourceURL=\s*(\S*?)\s*$/m);
},
/**
« no previous file with comments | « Source/devtools/front_end/ConsoleMessage.js ('k') | Source/devtools/front_end/ScriptSnippetModel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698