Bug 1243335 - report bad QName. r=sicking.

This commit is contained in:
Peter Van der Beken 2016-02-01 16:20:35 +01:00
parent 3de13c67e0
commit 4e1e6d6376

View File

@ -98,6 +98,9 @@ txAttribute::txAttribute(nsAutoPtr<Expr>&& aName, nsAutoPtr<Expr>&& aNamespace,
nsresult
txAttribute::execute(txExecutionState& aEs)
{
nsAutoPtr<txTextHandler> handler(
static_cast<txTextHandler*>(aEs.popResultHandler()));
nsAutoString name;
nsresult rv = mName->evaluateToString(aEs.getEvalContext(), name);
NS_ENSURE_SUCCESS(rv, rv);
@ -130,9 +133,6 @@ txAttribute::execute(txExecutionState& aEs)
nsId = mMappings->lookupNamespace(prefix);
}
nsAutoPtr<txTextHandler> handler(
static_cast<txTextHandler*>(aEs.popResultHandler()));
// add attribute if everything was ok
return nsId != kNameSpaceID_Unknown ?
aEs.mResultHandler->attribute(prefix, Substring(name, lnameStart),