vcl/source/treelist/uiobject.cxx |    6 ++++++
 1 file changed, 6 insertions(+)

New commits:
commit 2798430c8a711861fdcdfbf9ac00a0527abd3bfc
Author:     Stephan Bergmann <sberg...@redhat.com>
AuthorDate: Wed Feb 1 14:57:09 2023 +0100
Commit:     Stephan Bergmann <sberg...@redhat.com>
CommitDate: Wed Feb 1 15:29:57 2023 +0000

    Mark the uses of TreeListEntryUIObject as dubious
    
    See the commit message of 51a2e1a3963aae3228c9ddf78d0039c7c063393c "Let
    executeAction always ProcessEventsToIdle" for details.
    
    Change-Id: I25fa825c059f8e8e58018f5487557d0ffcee6aa1
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146454
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sberg...@redhat.com>

diff --git a/vcl/source/treelist/uiobject.cxx b/vcl/source/treelist/uiobject.cxx
index 4ab051a868e1..30ad0eaebc53 100644
--- a/vcl/source/treelist/uiobject.cxx
+++ b/vcl/source/treelist/uiobject.cxx
@@ -69,6 +69,9 @@ std::unique_ptr<UIObject> TreeListUIObject::get_child(const 
OUString& rID)
             return nullptr;
 
         return std::unique_ptr<UIObject>(new TreeListEntryUIObject(mxTreeList, 
pEntry));
+            //TODO: this looks dangerous, as there appears to be no protocol 
to guarantee that
+            // *pEntry will live as long as the new TreeListEntryUIObject 
referencing it by raw
+            // pointer
     }
     else if (nID == -1) // FIXME hack?
     {
@@ -172,6 +175,9 @@ std::unique_ptr<UIObject> 
TreeListEntryUIObject::get_child(const OUString& rID)
             return nullptr;
 
         return std::unique_ptr<UIObject>(new TreeListEntryUIObject(mxTreeList, 
pEntry));
+            //TODO: this looks dangerous, as there appears to be no protocol 
to guarantee that
+            // *pEntry will live as long as the new TreeListEntryUIObject 
referencing it by raw
+            // pointer
     }
 
     return nullptr;

Reply via email to