Since some platforms do string operations within local file ::Load, we shouldn't declare that objects being created/destroyed from static ctor/dtor is not legal throughout the entire ::Load function. That only needs to be true around the actual PR_LoadLibrary calls. Fixing this stops the ridiculous amount of warning output that we get from every debug mac build. Also removing unused old mac local file impls. b=326837 r=bsmedberg
git-svn-id: svn://10.0.0.236/trunk@215283 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -57,6 +57,7 @@
|
||||
#include "nsReadableUtils.h"
|
||||
#include "nsISupportsPrimitives.h"
|
||||
#include "nsIMutableArray.h"
|
||||
#include "nsTraceRefcntImpl.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// static helper functions
|
||||
@@ -1663,11 +1664,19 @@ nsLocalFile::Load(PRLibrary * *_retval)
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
|
||||
if (! isFile)
|
||||
if (!isFile)
|
||||
return NS_ERROR_FILE_IS_DIRECTORY;
|
||||
|
||||
#ifdef NS_BUILD_REFCNT_LOGGING
|
||||
nsTraceRefcntImpl::SetActivityIsLegal(PR_FALSE);
|
||||
#endif
|
||||
|
||||
*_retval = PR_LoadLibrary(mWorkingPath.get());
|
||||
|
||||
#ifdef NS_BUILD_REFCNT_LOGGING
|
||||
nsTraceRefcntImpl::SetActivityIsLegal(PR_TRUE);
|
||||
#endif
|
||||
|
||||
if (*_retval)
|
||||
return NS_OK;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user