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:
@@ -79,6 +79,8 @@
|
||||
#include "nsAutoLock.h"
|
||||
#include "SpecialSystemDirectory.h"
|
||||
|
||||
#include "nsTraceRefcntImpl.h"
|
||||
|
||||
// _mbsstr isn't declared in w32api headers but it's there in the libs
|
||||
#ifdef __MINGW32__
|
||||
extern "C" {
|
||||
@@ -1820,10 +1822,20 @@ nsLocalFile::Load(PRLibrary * *_retval)
|
||||
return NS_ERROR_FILE_IS_DIRECTORY;
|
||||
|
||||
NS_TIMELINE_START_TIMER("PR_LoadLibraryWithFlags");
|
||||
|
||||
#ifdef NS_BUILD_REFCNT_LOGGING
|
||||
nsTraceRefcntImpl::SetActivityIsLegal(PR_FALSE);
|
||||
#endif
|
||||
|
||||
PRLibSpec libSpec;
|
||||
libSpec.value.pathname_u = mResolvedPath.get();
|
||||
libSpec.type = PR_LibSpec_PathnameU;
|
||||
*_retval = PR_LoadLibraryWithFlags(libSpec, 0);
|
||||
|
||||
#ifdef NS_BUILD_REFCNT_LOGGING
|
||||
nsTraceRefcntImpl::SetActivityIsLegal(PR_TRUE);
|
||||
#endif
|
||||
|
||||
NS_TIMELINE_STOP_TIMER("PR_LoadLibraryWithFlags");
|
||||
NS_TIMELINE_MARK_TIMER1("PR_LoadLibraryWithFlags",
|
||||
NS_ConvertUTF16toUTF8(mResolvedPath).get());
|
||||
|
||||
Reference in New Issue
Block a user