Bug 1356412: Part 1 - Remove subscript loader path mangling. r=mccr8

This was only ever useful before we had compartment-based security isolation.
Now it is just a pervasive nuisance.

Differential Revision: https://phabricator.services.mozilla.com/D10795

--HG--
extra : rebase_source : 9af37bbd959b2db3d7a6c5ac723a474c47676f79
This commit is contained in:
Kris Maglione 2018-11-02 14:45:12 -07:00
Родитель 3da9ced0c9
Коммит f5e4ac7e08
3 изменённых файлов: 2 добавлений и 26 удалений

Просмотреть файл

@ -123,12 +123,7 @@ class Frame extends Component {
frame = this.props.frame;
}
// If the resource was loaded by browser-loader.js, `frame.source` looks like:
// resource://devtools/shared/base-loader.js -> resource://devtools/path/to/file.js .
// What's needed is only the last part after " -> ".
const source = frame.source
? String(frame.source).split(" -> ").pop()
: "";
const source = frame.source || "";
const line = frame.line != void 0 ? Number(frame.line) : null;
const column = frame.column != void 0 ? Number(frame.column) : null;

Просмотреть файл

@ -57,7 +57,7 @@ class StackTrace extends Component {
}), "\n");
}
const source = s.filename.split(" -> ").pop();
const source = s.filename;
frames.push("\t", Frame({
key: `${i}-frame`,
frame: {

Просмотреть файл

@ -698,25 +698,6 @@ mozJSSubScriptLoader::DoLoadSubScriptWithOptions(const nsAString& url,
return NS_OK;
}
if (!scheme.EqualsLiteral("chrome") && !scheme.EqualsLiteral("app") &&
!scheme.EqualsLiteral("blob")) {
// This might be a URI to a local file, though!
nsCOMPtr<nsIURI> innerURI = NS_GetInnermostURI(uri);
nsCOMPtr<nsIFileURL> fileURL = do_QueryInterface(innerURI);
if (!fileURL) {
ReportError(cx, LOAD_ERROR_URI_NOT_LOCAL, uri);
return NS_OK;
}
// For file URIs prepend the filename with the filename of the
// calling script, and " -> ". See bug 418356.
nsAutoCString tmp(filename.get());
tmp.AppendLiteral(" -> ");
tmp.Append(uriStr);
uriStr = tmp;
}
// Suppress caching if we're compiling as content or if we're loading a
// blob: URI.
bool useCompilationScope = false;