On Wed, Jan 8, 2014 at 9:22 PM, Neil <n...@parkwaycc.co.uk> wrote: > Ah, but it makes a subtle difference to the way XHR works; from a server, it > will parse according to the MIME type, which was HTML in my case, but from a > file:// URL, it always parses in XML, even if the document would normally > load as HTML (i.e. you XHR for a .html document). I certainly found this > behaviour unexpected, even if it isn't a bug.
There's a method called overrideMimeType() on XHR. > This then triggered another unexpected behaviour, which is that XHR's XML > parsing blocks onload but its HTML parsing does not. A more likely explanation is that some of our channel types, including file:, can file OnStartRequest, OnDataAvailable and OnStopRequest without spinning the event loop in between. I think this is harmful because it deviates from how http[s] channels work, but changing Necko to make this not be the case isn't really my area. The HTML parser sends the data to another thread, so even when a channel behaves badly, the HTML parser cannot finish without the event loop spinning before stuff can come back from the other thread. -- Henri Sivonen hsivo...@hsivonen.fi https://hsivonen.fi/ _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform