Bug 1163540 - make sure the debugger treats XBL inline sources correctly r=Gijs

This commit is contained in:
James Long 2015-06-02 15:41:09 -04:00
parent 71b99e504d
commit 644ade6df6

View File

@ -292,7 +292,13 @@ TabSources.prototype = {
if (url) {
try {
let urlInfo = Services.io.newURI(url, null, null).QueryInterface(Ci.nsIURL);
if (urlInfo.fileExtension === "js") {
if (urlInfo.fileExtension === "xml") {
// XUL inline scripts may not correctly have the
// `source.element` property, so do a blunt check here if
// it's an xml page.
spec.isInlineSource = true;
}
else if (urlInfo.fileExtension === "js") {
spec.contentType = "text/javascript";
}
} catch(ex) {