diff --git a/dom/xslt/xslt/txMozillaXSLTProcessor.cpp b/dom/xslt/xslt/txMozillaXSLTProcessor.cpp index 0df80716c1..867bc53392 100644 --- a/dom/xslt/xslt/txMozillaXSLTProcessor.cpp +++ b/dom/xslt/xslt/txMozillaXSLTProcessor.cpp @@ -604,6 +604,9 @@ txMozillaXSLTProcessor::ImportStylesheet(nsIDOMNode *aStyle) NS_ENSURE_TRUE(!mStylesheetDocument && !mStylesheet, NS_ERROR_NOT_IMPLEMENTED); + // Reset mCompileResult when importing. + mCompileResult = NS_OK; + nsCOMPtr node = do_QueryInterface(aStyle); if (!node || !nsContentUtils::SubjectPrincipalOrSystemIfNativeCaller()->Subsumes(node->NodePrincipal())) { return NS_ERROR_DOM_SECURITY_ERR;