loolwsd/LOOLKit.cpp | 5 ----- loolwsd/test/httpwstest.cpp | 7 +++++++ 2 files changed, 7 insertions(+), 5 deletions(-)
New commits: commit 06f56e646d473cbe96934493909217b5ffe06b29 Author: Tor Lillqvist <t...@collabora.com> Date: Thu Mar 3 17:13:57 2016 +0200 Test harder diff --git a/loolwsd/test/httpwstest.cpp b/loolwsd/test/httpwstest.cpp index 86d250a..2ab8fcc 100644 --- a/loolwsd/test/httpwstest.cpp +++ b/loolwsd/test/httpwstest.cpp @@ -39,6 +39,7 @@ class HTTPWSTest : public CPPUNIT_NS::TestFixture CPPUNIT_TEST(testPasswordProtectedDocument); CPPUNIT_TEST(testPasswordProtectedDocument2); CPPUNIT_TEST(testPasswordProtectedDocument3); + CPPUNIT_TEST(testPasswordProtectedDocument3again); CPPUNIT_TEST(testImpressPartCountChanged); CPPUNIT_TEST_SUITE_END(); @@ -48,6 +49,7 @@ class HTTPWSTest : public CPPUNIT_NS::TestFixture void testPasswordProtectedDocument(); void testPasswordProtectedDocument2(); void testPasswordProtectedDocument3(); + void testPasswordProtectedDocument3again(); void testImpressPartCountChanged(); static @@ -325,6 +327,11 @@ void HTTPWSTest::testPasswordProtectedDocument3() } } +void HTTPWSTest::testPasswordProtectedDocument3again() +{ + testPasswordProtectedDocument3(); +} + void HTTPWSTest::testImpressPartCountChanged() { try commit 2fab7574626919d66c637f40302cb00e8d280b3f Author: Tor Lillqvist <t...@collabora.com> Date: Thu Mar 3 17:09:36 2016 +0200 We use a recursive mutex, so no need to drop and re-take around documentLoad() The callbacks from documentLoad() are made in the same thread. Sure, as such it is not a good thing to use recursive mutexes. If we switch back to non-recursive mutexes, we will have to stop taking the lock in callbacks from documentLoad(), i.e. make sure we know those functions aren't used elsewhere, in places where a lock would be needed. Or something. diff --git a/loolwsd/LOOLKit.cpp b/loolwsd/LOOLKit.cpp index 31b659d..7942436 100644 --- a/loolwsd/LOOLKit.cpp +++ b/loolwsd/LOOLKit.cpp @@ -620,9 +620,6 @@ private: LOK_FEATURE_DOCUMENT_PASSWORD_TO_MODIFY); } - // documentLoad will trigger callback, which needs to take the lock. - lock.unlock(); - // Save the provided password with us and the jailed url _isDocPasswordProvided = isDocPasswordProvided; _docPassword = docPassword; @@ -652,8 +649,6 @@ private: return nullptr; } Log::info("documentLoad() returned"); - // Retake the lock. - lock.lock(); if (_multiView) { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits