Regression from commit 2dc3a6c273
(framework: allow loading a component on the main thread, 2018-12-19),
which was a forward-port from a 5.4-based vendor branch, where this was
(it turns out) just working by accident, but never on master.
It can happen that loadComponentFromURL() is invoked on a thread, which
does not own the solar mutex. Then once
vcl::SolarThreadExecutor::execute() is called, it'll try to release the
solar mutex. But SolarMutexReleaser is unsafe: it'll release the mutex
even if it is owned by an other thread.
To make this a bit more safer, it'll abort in
comphelper::SolarMutex::doRelease(), in case the current thread doesn't
have the mutex already.
Fix the problem by taking the solar mutex in loadComponentFromURL():
this is meant to cause no performance problems, since the actual
importers typically start with taking the solar mutex anyway. Taking it
earlier would be problematic, since this can be invoked by UNO clients
directly. Taking it later in vcl/ would be also unusual: typically vcl
just asserts that the solar mutex is locked, doesn't take it itself.
Change-Id: I752006a91f16a02254d1b5ac6301100ab282630b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103264
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
49 lines
1.5 KiB
Makefile
49 lines
1.5 KiB
Makefile
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
|
|
#
|
|
# This file is part of the LibreOffice project.
|
|
#
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
#
|
|
# This file incorporates work covered by the following license notice:
|
|
#
|
|
# Licensed to the Apache Software Foundation (ASF) under one or more
|
|
# contributor license agreements. See the NOTICE file distributed
|
|
# with this work for additional information regarding copyright
|
|
# ownership. The ASF licenses this file to you under the Apache
|
|
# License, Version 2.0 (the "License"); you may not use this file
|
|
# except in compliance with the License. You may obtain a copy of
|
|
# the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
#
|
|
|
|
$(eval $(call gb_Module_Module,framework))
|
|
|
|
$(eval $(call gb_Module_add_targets,framework,\
|
|
Library_fwk \
|
|
Package_dtd \
|
|
UIConfig_startmodule \
|
|
))
|
|
|
|
$(eval $(call gb_Module_add_slowcheck_targets,framework,\
|
|
CppunitTest_framework_dispatch \
|
|
))
|
|
|
|
# Not sure why this is not stable on macOS.
|
|
ifneq ($(OS),MACOSX)
|
|
$(eval $(call gb_Module_add_slowcheck_targets,framework,\
|
|
CppunitTest_framework_services \
|
|
))
|
|
endif
|
|
|
|
$(eval $(call gb_Module_add_l10n_targets,framework,\
|
|
AllLangMoTarget_fwk \
|
|
))
|
|
|
|
$(eval $(call gb_Module_add_subsequentcheck_targets,framework,\
|
|
JunitTest_framework_complex \
|
|
JunitTest_framework_unoapi \
|
|
))
|
|
|
|
# vim: set noet sw=4 ts=4:
|