XSLTProcessor fails with <import>

I’ve been using XSLTProcessor without problems like this:

  var xsltProcessor = Cc['@mozilla.org/document-transformer;1?type=xslt'].createInstance(Ci.nsIXSLTProcessor);
  xsltProcessor.importStylesheet(xsl);
  var result = xsltProcessor.transformToFragment(xml, doc);

Starting with 45a builds importing another xsl file fails:

<xsl:stylesheet version="1.0"
                xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:import href="file.xsl"/>
    ...
</xsl:stylesheet>

This code is called from a XBL binding. importStylesheet() throws an exception without message or name:

Exception { message: “”, result: 2153775131, name: “”, filename: “file.js”, lineNumber: 46, columnNumber: 0, data: null, stack: “…”, location: XPCWrappedNative_NoHelper }

I’ve had a look at recent changes, but that didn’t really help to find a solution. Also, I can’t look at the associated bug report (“You are not authorized to access bug 1072150”). Release notes for developers don’t mention anything related to this as far as I can see. I’m stumped. What can I do about this?

I suggest that you file a new bug for that regression, make it block bug 1072150 and needinfo the patch author (Bobby Holley) about it. It could be that it’s a necessary security fix, or it could be an unintended consequence.

Thanks, just added the bug, but I’m not allowed to make it block the other bug or even just reference it either.

What’s the number of the bug you filed?

It’s bug 1249572.