Fixup for mistake in earlier commit

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@39374 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2016-02-15 11:07:44 +00:00
parent 09f15d2b8d
commit 44165e9bcc
2 changed files with 19 additions and 16 deletions

View file

@ -573,25 +573,28 @@ static void exitedThread(void *thread)
{
if (thread != defaultThread)
{
CREATE_AUTORELEASE_POOL(arp);
NSValue *ref;
RETAIN((NSThread*)thread);
ref = NSValueCreateFromPthread(pthread_self());
_willLateUnregisterThread(ref, (NSThread*)thread);
NS_DURING
{
unregisterActiveThread((NSThread*)thread);
}
NS_HANDLER
{
DESTROY(arp);
_didLateUnregisterCurrentThread(ref);
DESTROY(ref);
RELEASE((NSThread*)thread);
}
NS_ENDHANDLER
DESTROY(arp);
{
CREATE_AUTORELEASE_POOL(arp);
NS_DURING
{
unregisterActiveThread((NSThread*)thread);
}
NS_HANDLER
{
DESTROY(arp);
_didLateUnregisterCurrentThread(ref);
DESTROY(ref);
RELEASE((NSThread*)thread);
}
NS_ENDHANDLER
DESTROY(arp);
}
/* At this point threre shouldn't be any autoreleased objects lingering
* around anymore. So we may remove the thread from the lookup table.

View file

@ -576,6 +576,7 @@ newLanguages(NSArray *oldNames)
NSNumberClass = [NSNumber class];
NSMutableDictionaryClass = [NSMutableDictionary class];
NSStringClass = [NSString class];
argumentsDictionary = [NSDictionary new];
[self registerAtExit];
/* Initialise the defaults flags to take values from the
@ -2340,12 +2341,11 @@ NSDictionary *GSPrivateDefaultLocale()
}
done = ((key = [enumerator nextObject]) == nil);
}
argumentsDictionary = [argDict copy];
ASSIGNCOPY(argumentsDictionary, argDict);
[classLock unlock];
}
NS_HANDLER
{
argumentsDictionary = [NSDictionary new];
[classLock unlock];
[localException raise];
}