summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-03-01 11:10:58 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-03-01 17:55:25 +0100
commit44a403d5a63b16e04b1c66ded6ef4e3bda605ab3 (patch)
tree5fa274c12d2b76d6af062a2eadf6d240dae008c4
parent6df85675378a5a90b0d89d712015e010f6893c9f (diff)
fix data race in ImportFinished
touching these fields here leads to a race with the access in ::Import. Rather just leave them to be cleared when the object is destructed. Change-Id: I0016917455d4e252e360cc49e3d1ca56f4eabb30 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130749 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--sc/source/ui/dataprovider/htmldataprovider.cxx2
-rw-r--r--sc/source/ui/dataprovider/xmldataprovider.cxx7
2 files changed, 1 insertions, 8 deletions
diff --git a/sc/source/ui/dataprovider/htmldataprovider.cxx b/sc/source/ui/dataprovider/htmldataprovider.cxx
index 75f222e5fb6d..8b241ddfe049 100644
--- a/sc/source/ui/dataprovider/htmldataprovider.cxx
+++ b/sc/source/ui/dataprovider/htmldataprovider.cxx
@@ -268,8 +268,6 @@ void HTMLDataProvider::Import()
void HTMLDataProvider::ImportFinished()
{
mrDataSource.getDBManager()->WriteToDoc(*mpDoc);
- mxHTMLFetchThread.clear();
- mpDoc.reset();
}
const OUString& HTMLDataProvider::GetURL() const
diff --git a/sc/source/ui/dataprovider/xmldataprovider.cxx b/sc/source/ui/dataprovider/xmldataprovider.cxx
index ba5bba61ac1c..4ffa45bd16e7 100644
--- a/sc/source/ui/dataprovider/xmldataprovider.cxx
+++ b/sc/source/ui/dataprovider/xmldataprovider.cxx
@@ -118,12 +118,7 @@ void XMLDataProvider::Import()
}
}
-void XMLDataProvider::ImportFinished()
-{
- mrDataSource.getDBManager()->WriteToDoc(*mpDoc);
- mxXMLFetchThread.clear();
- mpDoc.reset();
-}
+void XMLDataProvider::ImportFinished() { mrDataSource.getDBManager()->WriteToDoc(*mpDoc); }
const OUString& XMLDataProvider::GetURL() const { return mrDataSource.getURL(); }
}