Bug 1336828 - Ignore the obsolete handler if the transform fails. r=erahm, a=jcristau
authorPeter Van der Beken <peterv@propagandism.org>
Fri, 10 Feb 2017 14:38:57 +0100
changeset 312839 982cfe33c513817cb6f6346b67ecc285467940a0
parent 312838 7bbd869ae0d22ade6108c79d7ceecb8f69c4ac37
child 312840 b50ad6ab36ee80017eedf8891e179aeae5520f16
push id502
push userryanvm@gmail.com
push dateThu, 30 Mar 2017 23:54:29 +0000
treeherdermozilla-esr45@982cfe33c513 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerserahm, jcristau
bugs1336828
milestone45.8.1
Bug 1336828 - Ignore the obsolete handler if the transform fails. r=erahm, a=jcristau
dom/xslt/xslt/txExecutionState.cpp
--- a/dom/xslt/xslt/txExecutionState.cpp
+++ b/dom/xslt/xslt/txExecutionState.cpp
@@ -77,17 +77,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;