Bug 1166048 - Part 1: Do not set the sourceRoot of a source map that has all source contents embedded; r=jlongster

This commit is contained in:
Nick Fitzgerald 2015-07-07 19:52:58 -07:00
parent 1567046bd7
commit dd453b9b42

View File

@ -450,6 +450,12 @@ TabSources.prototype = {
* Sets the source map's sourceRoot to be relative to the source map url.
*/
_setSourceMapRoot: function (aSourceMap, aAbsSourceMapURL, aScriptURL) {
// No need to do this fiddling if we won't be fetching any sources over the
// wire.
if (aSourceMap.hasContentsOfAllSources()) {
return;
}
const base = this._dirname(
aAbsSourceMapURL.indexOf("data:") === 0
? aScriptURL