kit/Kit.cpp |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit e0dcc7a972e1923605b02f9c7a0bd0cadf5aafef
Author: Ashod Nakashian <ashod.nakash...@collabora.co.uk>
Date:   Wed Jan 11 17:06:45 2017 -0500

    wsd: retain the Core callback object
    
    Since we have no control over when Core might
    use the callback object, we should retain it
    indefinetely. This is safer and has no impact.
    
    Because Core uses a timer to flush callbacks,
    it can issue the callbacks for a view after
    it had been destroyed, thereby segfaulting.
    
    Change-Id: I2ef87234d0b4dff83ded320b480abce53188fec4
    Reviewed-on: https://gerrit.libreoffice.org/33116
    Reviewed-by: Ashod Nakashian <ashnak...@gmail.com>
    Tested-by: Ashod Nakashian <ashnak...@gmail.com>

diff --git a/kit/Kit.cpp b/kit/Kit.cpp
index 13bea18..f28978e 100644
--- a/kit/Kit.cpp
+++ b/kit/Kit.cpp
@@ -962,7 +962,10 @@ private:
             _loKitDocument->destroyView(viewId);
         }
 
-         _viewIdToCallbackDescr.erase(viewId);
+        // Since callback messages are processed on idle-timer,
+        // we could recieve callbacks after destroying a view.
+        // Retain the CallbackDescriptor object, which is shared with Core.
+        // _viewIdToCallbackDescr.erase(viewId);
 
         viewCount = _loKitDocument->getViewsCount();
         LOG_INF("Document [" << _url << "] session [" <<
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to