From 91599490dad65aeada30881b997461897aa35262 Mon Sep 17 00:00:00 2001 From: "sdagley%netscape.com" Date: Fri, 4 May 2001 09:01:06 +0000 Subject: [PATCH] #70543 - Mac OS running out of FCBs when loading libraries. Now yield time to OS to allow it to grow the FCB table (shouldn't be necessary, apparently is). sr=sfraser,r=macdev --- xpcom/components/nsNativeComponentLoader.cpp | 11 ----------- xpcom/io/nsLocalFileMac.cpp | 8 ++++++++ 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/xpcom/components/nsNativeComponentLoader.cpp b/xpcom/components/nsNativeComponentLoader.cpp index 5dee445af644..bcbb30d110b8 100644 --- a/xpcom/components/nsNativeComponentLoader.cpp +++ b/xpcom/components/nsNativeComponentLoader.cpp @@ -751,17 +751,6 @@ nsNativeComponentLoader::AutoRegisterComponent(PRInt32 when, // so that 3rd party shared libraries will be noticed! validExtension = ((type == 'shlb') || (type == 'NSPL')); } - -#if !TARGET_CARBON - if (validExtension) - { - // This call to SystemTask is here to give the OS time to grow it's - // FCB (file control block) list, which it seems to be unable to - // do unless we yield some time to the OS. See bug 64978 for the whole - // story. - ::SystemTask(); - } -#endif } #else diff --git a/xpcom/io/nsLocalFileMac.cpp b/xpcom/io/nsLocalFileMac.cpp index 95671850d67f..553405546050 100644 --- a/xpcom/io/nsLocalFileMac.cpp +++ b/xpcom/io/nsLocalFileMac.cpp @@ -1545,6 +1545,14 @@ nsLocalFile::Load(PRLibrary * *_retval) if (! isFile) return NS_ERROR_FILE_IS_DIRECTORY; +#if !TARGET_CARBON + // This call to SystemTask is here to give the OS time to grow its + // FCB (file control block) list, which it seems to be unable to + // do unless we yield some time to the OS. See bugs 64978 & 70543 + // for the whole story. + ::SystemTask(); +#endif + // Use the new PR_LoadLibraryWithFlags which allows us to use a FSSpec PRLibSpec libSpec; libSpec.type = PR_LibSpec_MacIndexedFragment;