followup for bug 602115. Missed this when I moved patch to this branch.
authorJonas Sicking <jonas@sicking.cc>
Wed, 19 Jan 2011 10:13:03 -0800
changeset 27302 7f3448d6580873671655fe56039f889887471d5d
parent 27301 4693aab773ece6f3405867b1bfed6e0d96054524
child 27303 237c9fe0398447dc4dd6abe78abba47ba5c9a225
push id2642
push usersicking@mozilla.com
push dateWed, 19 Jan 2011 18:13:25 +0000
bugs602115
milestone1.9.1.17pre
followup for bug 602115. Missed this when I moved patch to this branch.
content/xslt/src/xslt/txExecutionState.cpp
--- a/content/xslt/src/xslt/txExecutionState.cpp
+++ b/content/xslt/src/xslt/txExecutionState.cpp
@@ -399,20 +399,24 @@ txExecutionState::popResultHandler()
 }
 
 nsresult
 txExecutionState::pushTemplateRule(txStylesheet::ImportFrame* aFrame,
                                    const txExpandedName& aMode,
                                    txVariableMap* aParams)
 {
     TemplateRule* rule = mTemplateRules.AppendElement();
+    NS_ENSURE_TRUE(rule, NS_ERROR_OUT_OF_MEMORY);
+
     rule->mFrame = aFrame;
     rule->mModeNsId = aMode.mNamespaceID;
     rule->mModeLocalName = aMode.mLocalName;
     rule->mParams = aParams;
+
+    return NS_OK;
 }
 
 void
 txExecutionState::popTemplateRule()
 {
     NS_PRECONDITION(!mTemplateRules.IsEmpty(), "No rules to pop");
     mTemplateRules.RemoveElementAt(mTemplateRules.Length() - 1);
 }