Bug 1336828 - Ignore the obsolete handler if the transform fails, r=erahm, a=lizzard.
authorPeter Van der Beken <peterv@propagandism.org>
Fri, 10 Feb 2017 14:38:57 +0100
changeset 379254 fa31c6b8354559a6fad9390a843f0f3bc636f849
parent 379253 df0808040376f8e12f1d110cf8855c7666476291
child 379255 cc44bcedcee257bdc94c1d20e1b68e9e025a3e0f
push id1419
push userjlund@mozilla.com
push dateMon, 10 Apr 2017 20:44:07 +0000
treeherdermozilla-release@5e6801b73ef6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerserahm, lizzard
bugs1336828
milestone53.0
Bug 1336828 - Ignore the obsolete handler if the transform fails, r=erahm, a=lizzard.
dom/xslt/xslt/txExecutionState.cpp
--- a/dom/xslt/xslt/txExecutionState.cpp
+++ b/dom/xslt/xslt/txExecutionState.cpp
@@ -82,17 +82,20 @@ txExecutionState::~txExecutionState()
         txIEvalContext* context = (txIEvalContext*)contextIter.next();
         if (context != mInitialEvalContext) {
             delete context;
         }
     }
 
     txStackIterator handlerIter(&mResultHandlerStack);
     while (handlerIter.hasNext()) {
-        delete (txAXMLEventHandler*)handlerIter.next();
+        txAXMLEventHandler* handler = (txAXMLEventHandler*)handlerIter.next();
+        if (handler != mObsoleteHandler) {
+          delete handler;
+        }
     }
 
     txStackIterator paramIter(&mParamStack);
     while (paramIter.hasNext()) {
         delete (txVariableMap*)paramIter.next();
     }
 
     delete mInitialEvalContext;