sc/source/ui/dataprovider/htmldataprovider.cxx |    2 --
 sc/source/ui/dataprovider/xmldataprovider.cxx  |    7 +------
 2 files changed, 1 insertion(+), 8 deletions(-)

New commits:
commit 44a403d5a63b16e04b1c66ded6ef4e3bda605ab3
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Tue Mar 1 11:10:58 2022 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Tue Mar 1 17:55:25 2022 +0100

    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.gran...@collabora.co.uk>

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(); }
 }

Reply via email to