Bug 1136341 - fix source actors representing inline scripts in XUL files so breakpoints work r=ejpbruel
authorJames Long <longster@gmail.com>
Tue, 24 Mar 2015 10:01:00 -0700
changeset 265733 90e2fc63452d431b9bde6019059f869f2becba26
parent 265732 1ac5202c2affa22d42fa063e2a3f38982d86041d
child 265734 4944dc94d987f000842733919d9ed1cb29e18c7f
push id830
push userraliiev@mozilla.com
push dateFri, 19 Jun 2015 19:24:37 +0000
treeherdermozilla-release@932614382a68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersejpbruel
bugs1136341
milestone39.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1136341 - fix source actors representing inline scripts in XUL files so breakpoints work r=ejpbruel
toolkit/devtools/server/actors/utils/TabSources.js
--- a/toolkit/devtools/server/actors/utils/TabSources.js
+++ b/toolkit/devtools/server/actors/utils/TabSources.js
@@ -273,17 +273,17 @@ TabSources.prototype = {
     // if the source is an HTML-embedded <script> tag. Since we don't
     // have an API implemented to detect whether this is the case, we
     // need to be conservative and only treat valid js files as real
     // sources. Otherwise, use the `originalUrl` property to treat it
     // as an HTML source that manages multiple inline sources.
     if (url) {
       try {
         let urlInfo = Services.io.newURI(url, null, null).QueryInterface(Ci.nsIURL);
-        if (urlInfo.fileExtension === "html") {
+        if (urlInfo.fileExtension === "html" || urlInfo.fileExtension === "xml") {
           spec.isInlineSource = true;
         }
         else if (urlInfo.fileExtension === "js") {
           spec.contentType = "text/javascript";
         }
       } catch(ex) {
         // Not a valid URI.