Kaydet (Commit) 374c9af2 authored tarafından Ariel Constenla-Haile's avatar Ariel Constenla-Haile Kaydeden (comit) Michael Stahl

i118798 - Fix Pyuno dead-lock

Fixes fdo#57569, thanks to Miklós Prisznyák for the hint.

git-svn-id: https://svn-master.apache.org/repos/asf/incubator/ooo/trunk@1232123 13f79535-47bb-0310-9956-ffa450edef68
üst 6531960a
...@@ -359,20 +359,20 @@ Any Adapter::invoke( const OUString &aFunctionName, ...@@ -359,20 +359,20 @@ Any Adapter::invoke( const OUString &aFunctionName,
void Adapter::setValue( const OUString & aPropertyName, const Any & value ) void Adapter::setValue( const OUString & aPropertyName, const Any & value )
throw( UnknownPropertyException, CannotConvertException, InvocationTargetException,RuntimeException) throw( UnknownPropertyException, CannotConvertException, InvocationTargetException,RuntimeException)
{ {
if( !hasProperty( aPropertyName ) )
{
OUStringBuffer buf;
buf.appendAscii( "pyuno::Adapater: Property " ).append( aPropertyName );
buf.appendAscii( " is unknown." );
throw UnknownPropertyException( buf.makeStringAndClear(), Reference< XInterface > () );
}
PyThreadAttach guard( mInterpreter ); PyThreadAttach guard( mInterpreter );
try try
{ {
Runtime runtime; Runtime runtime;
PyRef obj = runtime.any2PyObject( value ); PyRef obj = runtime.any2PyObject( value );
if( !hasProperty( aPropertyName ) )
{
OUStringBuffer buf;
buf.appendAscii( "pyuno::Adapater: Property " ).append( aPropertyName );
buf.appendAscii( " is unknown." );
throw UnknownPropertyException( buf.makeStringAndClear(), Reference< XInterface > () );
}
PyObject_SetAttrString( PyObject_SetAttrString(
mWrappedObject.get(), (char*)TO_ASCII(aPropertyName), obj.get() ); mWrappedObject.get(), (char*)TO_ASCII(aPropertyName), obj.get() );
raiseInvocationTargetExceptionWhenNeeded( runtime); raiseInvocationTargetExceptionWhenNeeded( runtime);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment