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

Side by Side Diff: Source/devtools/front_end/utilities.js

Issue 15832007: DevTools: Add support for //# sourceURL (sourceMappingURL) comments and deprecate //@ ones (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2007 Apple Inc. All rights reserved.
3 * Copyright (C) 2012 Google Inc. All rights reserved. 3 * Copyright (C) 2012 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 1110 matching lines...) Expand 10 before | Expand all | Expand 10 after
1121 return; 1121 return;
1122 var xhr = new XMLHttpRequest(); 1122 var xhr = new XMLHttpRequest();
1123 _importedScripts[scriptName] = true; 1123 _importedScripts[scriptName] = true;
1124 if (window.flattenImports) 1124 if (window.flattenImports)
1125 scriptName = scriptName.split("/").reverse()[0]; 1125 scriptName = scriptName.split("/").reverse()[0];
1126 xhr.open("GET", scriptName, false); 1126 xhr.open("GET", scriptName, false);
1127 xhr.send(null); 1127 xhr.send(null);
1128 if (!xhr.responseText) 1128 if (!xhr.responseText)
1129 throw "empty response arrived for script '" + scriptName + "'"; 1129 throw "empty response arrived for script '" + scriptName + "'";
1130 var sourceURL = WebInspector.ParsedURL.completeURL(window.location.href, scr iptName); 1130 var sourceURL = WebInspector.ParsedURL.completeURL(window.location.href, scr iptName);
1131 window.eval(xhr.responseText + "\n//@ sourceURL=" + sourceURL); 1131 window.eval(xhr.responseText + "\n//# sourceURL=" + sourceURL);
1132 } 1132 }
1133 1133
1134 var loadScript = importScript; 1134 var loadScript = importScript;
1135 1135
1136 /** 1136 /**
1137 * @constructor 1137 * @constructor
1138 */ 1138 */
1139 function CallbackBarrier() 1139 function CallbackBarrier()
1140 { 1140 {
1141 this._pendingIncomingCallbacksCount = 0; 1141 this._pendingIncomingCallbacksCount = 0;
(...skipping 27 matching lines...) Expand all
1169 console.assert(this._pendingIncomingCallbacksCount > 0); 1169 console.assert(this._pendingIncomingCallbacksCount > 0);
1170 if (userCallback) { 1170 if (userCallback) {
1171 var args = Array.prototype.slice.call(arguments, 1); 1171 var args = Array.prototype.slice.call(arguments, 1);
1172 userCallback.apply(null, args); 1172 userCallback.apply(null, args);
1173 } 1173 }
1174 if (!--this._pendingIncomingCallbacksCount && this._outgoingCallback) 1174 if (!--this._pendingIncomingCallbacksCount && this._outgoingCallback)
1175 this._outgoingCallback(); 1175 this._outgoingCallback();
1176 } 1176 }
1177 } 1177 }
1178 1178
OLDNEW
« Source/devtools/front_end/ConsoleMessage.js ('K') | « Source/devtools/front_end/View.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698