diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2017-01-18 10:16:14 +0300 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2017-02-17 22:56:56 +0100 |
commit | 97eaa05c40a926a9e16a109028ca8c829d34cb34 (patch) | |
tree | cf171d2ece4f2fbc9e00bbd960bcebadd300d6b1 /sax | |
parent | 1e996e3ae1f39b23efe846831d0498aa748a4f70 (diff) |
Also consider saved exceptions when mbEnableThreads is true
Previously, saved exceptions are only checked in FastSaxParserImpl::parse(),
which is used in case mbEnableThreads is false (when data in input stream
is no more than 10000). This patch also enables the same check for the
other case.
Change-Id: Ie718556b7c01322e30698515ecd331b7ebad4105
Reviewed-on: https://gerrit.libreoffice.org/33249
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
(cherry picked from commit 18ae77a065cb8ae6940d4067f6ab7e99a3f74047)
Diffstat (limited to 'sax')
-rw-r--r-- | sax/source/fastparser/fastparser.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sax/source/fastparser/fastparser.cxx b/sax/source/fastparser/fastparser.cxx index 03ea471d225b..420f8c79ce2e 100644 --- a/sax/source/fastparser/fastparser.cxx +++ b/sax/source/fastparser/fastparser.cxx @@ -811,6 +811,10 @@ void FastSaxParserImpl::parseStream(const InputSource& maStructSource) } while (!done); xParser->join(); deleteUsedEvents(); + + // callbacks used inside XML_Parse may have caught an exception + if( rEntity.maSavedException.hasValue() ) + rEntity.throwException( mxDocumentLocator, true ); } else { |