rpms/openoffice.org/devel workspace.sb128.patch, NONE, 1.1 openoffice.org.spec, 1.2269, 1.2270

David Tardon dtardon at fedoraproject.org
Wed Jul 7 07:53:43 UTC 2010


Author: dtardon

Update of /cvs/pkgs/rpms/openoffice.org/devel
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv1525

Modified Files:
	openoffice.org.spec 
Added Files:
	workspace.sb128.patch 
Log Message:
add workspace.sb128.patch workaround deadlock in smoketest

workspace.sb128.patch:
 smoketest.cxx |   44 +++++++++++++++++++++++++++++++++++++++-----
 1 file changed, 39 insertions(+), 5 deletions(-)

--- NEW FILE workspace.sb128.patch ---

# HG changeset patch
# User sb at openoffice.org
# Date 1278483636 -7200
# Node ID 5dc61b93c5ef2ed21e3d9532325b35a70fef18da
# Parent  cb53cd9871016271ae80b7157a276f751daf95f5
sb128: #i112986# shifted relevant smoketest work to OOo main thread to work around potential deadlocks

diff -r cb53cd987101 -r 5dc61b93c5ef smoketestoo_native/smoketest.cxx
--- a/smoketestoo_native/smoketest.cxx	Mon Jul 05 14:19:36 2010 +0200
+++ b/smoketestoo_native/smoketest.cxx	Wed Jul 07 08:20:36 2010 +0200
@@ -28,6 +28,8 @@
 #include "sal/config.h"
 
 #include "boost/noncopyable.hpp"
+#include "com/sun/star/awt/XCallback.hpp"
+#include "com/sun/star/awt/XRequestCallback.hpp"
 #include "com/sun/star/beans/PropertyState.hpp"
 #include "com/sun/star/beans/PropertyValue.hpp"
 #include "com/sun/star/document/MacroExecMode.hpp"
@@ -40,6 +42,7 @@
 #include "com/sun/star/frame/XModel.hpp"
 #include "com/sun/star/frame/XNotifyingDispatch.hpp"
 #include "com/sun/star/lang/EventObject.hpp"
+#include "com/sun/star/uno/Any.hxx"
 #include "com/sun/star/uno/Reference.hxx"
 #include "com/sun/star/uno/RuntimeException.hpp"
 #include "com/sun/star/uno/Sequence.hxx"
@@ -94,6 +97,29 @@
     result_->condition.set();
 }
 
+class Callback: public cppu::WeakImplHelper1< css::awt::XCallback > {
+public:
+    Callback(
+        css::uno::Reference< css::frame::XNotifyingDispatch > const & dispatch,
+        css::util::URL const & url,
+        css::uno::Sequence< css::beans::PropertyValue > const & arguments,
+        css::uno::Reference< css::frame::XDispatchResultListener > const &
+            listener):
+        dispatch_(dispatch), url_(url), arguments_(arguments),
+        listener_(listener)
+    { OSL_ASSERT(dispatch.is()); }
+
+private:
+    virtual void SAL_CALL notify(css::uno::Any const &)
+        throw (css::uno::RuntimeException)
+    { dispatch_->dispatchWithNotification(url_, arguments_, listener_); }
+
+    css::uno::Reference< css::frame::XNotifyingDispatch > dispatch_;
+    css::util::URL url_;
+    css::uno::Sequence< css::beans::PropertyValue > arguments_;
+    css::uno::Reference< css::frame::XDispatchResultListener > listener_;
+};
+
 class Test: public CppUnit::TestFixture {
 public:
     virtual void setUp();
@@ -135,8 +161,7 @@
         RTL_CONSTASCII_USTRINGPARAM(
             "vnd.sun.star.script:Standard.Global.StartTestWithDefaultOptions?"
             "language=Basic&location=document"));
-    Result result;
-    css::uno::Reference< css::frame::XNotifyingDispatch >(
+    css::uno::Reference< css::frame::XNotifyingDispatch > disp(
         css::uno::Reference< css::frame::XDispatchProvider >(
             css::uno::Reference< css::frame::XController >(
                 css::uno::Reference< css::frame::XModel >(
@@ -154,9 +179,18 @@
                 css::uno::UNO_SET_THROW)->getFrame(),
             css::uno::UNO_QUERY_THROW)->queryDispatch(
                 url, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("_self")), 0),
-        css::uno::UNO_QUERY_THROW)->dispatchWithNotification(
-            url, css::uno::Sequence< css::beans::PropertyValue >(),
-            new Listener(&result));
+        css::uno::UNO_QUERY_THROW);
+    Result result;
+    // Shifted to main thread to work around potential deadlocks (i112867):
+    css::uno::Reference< css::awt::XRequestCallback >(
+        connection_.getFactory()->createInstance( //TODO: AsyncCallback ctor
+            rtl::OUString(
+                RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.AsyncCallback"))),
+        css::uno::UNO_QUERY_THROW)->addCallback(
+            new Callback(
+                disp, url, css::uno::Sequence< css::beans::PropertyValue >(),
+                new Listener(&result)),
+            css::uno::Any());
     result.condition.wait();
     CPPUNIT_ASSERT(result.success);
     CPPUNIT_ASSERT_EQUAL(rtl::OUString(), result.result);



Index: openoffice.org.spec
===================================================================
RCS file: /cvs/pkgs/rpms/openoffice.org/devel/openoffice.org.spec,v
retrieving revision 1.2269
retrieving revision 1.2270
diff -u -p -r1.2269 -r1.2270
--- openoffice.org.spec	3 Jul 2010 19:49:28 -0000	1.2269
+++ openoffice.org.spec	7 Jul 2010 07:53:42 -0000	1.2270
@@ -1,6 +1,6 @@
 %define oootag OOO320
 %define ooomilestone 19
-%define rh_rpm_release 20
+%define rh_rpm_release 21
 
 # rhbz#465664 jar-repacking breaks help by reordering META-INF/MANIFEST.MF
 %define __jar_repack %{nil}
@@ -152,6 +152,7 @@ Patch81: openoffice.org-3.3.0.ooo112384.
 Patch82: workspace.gtkfpicker9.patch
 Patch83: workspace.gtk3.patch
 Patch84: workspace.sw33bf06.patch
+Patch85: workspace.sb128.patch
 
 %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
 %define instdir %{_libdir}
@@ -1717,6 +1718,7 @@ cp -p %{SOURCE5} external/unowinreg/unow
 %patch82 -p0 -b .workspace.gtkfpicker9.patch
 %patch83 -p0 -b .workspace.gtk3.patch
 %patch84 -p0 -b .workspace.sw33bf06.patch
+%patch85 -p1 -b .workspace.sb128.patch
 
 %build
 echo build start time is `date`, diskspace: `df -h . | tail -n 1`
@@ -4369,6 +4371,9 @@ fi
 %endif
 
 %changelog
+* Thu Jul 07 2010 Caolán McNamara <caolanm at redhat.com> - 1:3.2.1-19.21
+- add workspace.sb128.patch workaround deadlock in smoketest (dtardon)
+
 * Thu Jun 30 2010 Caolán McNamara <caolanm at redhat.com> - 1:3.2.1-19.20
 - fix up indic cursor calc input cell breakage
 



More information about the scm-commits mailing list