diff --git a/toolkit/devtools/server/actors/utils/TabSources.js b/toolkit/devtools/server/actors/utils/TabSources.js index e8d594be3dd..1368a6218bb 100644 --- a/toolkit/devtools/server/actors/utils/TabSources.js +++ b/toolkit/devtools/server/actors/utils/TabSources.js @@ -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) {