mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 22:32:46 +00:00
fixes build bustage with --enable-xpctools
patch=dmose r/sr=darin
This commit is contained in:
parent
3285301d39
commit
9508d71adc
@ -78,13 +78,13 @@ nsXPConnect::nsXPConnect()
|
||||
|
||||
#ifdef XPC_TOOLS_SUPPORT
|
||||
{
|
||||
const char* filename = PR_GetEnv("MOZILLA_JS_PROFILER_OUTPUT");
|
||||
if(filename)
|
||||
nsDependentCString filename(PR_GetEnv("MOZILLA_JS_PROFILER_OUTPUT"));
|
||||
if(!filename.IsEmpty())
|
||||
{
|
||||
|
||||
mProfilerOutputFile = do_CreateInstance(NS_LOCAL_FILE_CONTRACTID);
|
||||
if(mProfilerOutputFile &&
|
||||
NS_SUCCEEDED(mProfilerOutputFile->InitWithPath(filename)))
|
||||
NS_SUCCEEDED(mProfilerOutputFile->InitWithNativePath(filename)))
|
||||
{
|
||||
mProfiler = do_GetService(XPCTOOLS_PROFILER_CONTRACTID);
|
||||
if(mProfiler)
|
||||
@ -93,7 +93,7 @@ nsXPConnect::nsXPConnect()
|
||||
{
|
||||
#ifdef DEBUG
|
||||
printf("***** profiling JavaScript. Output to: %s\n",
|
||||
filename);
|
||||
filename.get());
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
@ -116,8 +116,8 @@ NS_IMETHODIMP nsXPCToolsCompiler::CompileFile(nsILocalFile *aFile, PRBool strict
|
||||
if (!JS_InitStandardClasses(cx, glob))
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
char * path = nsnull;
|
||||
if(NS_FAILED(aFile->GetPath(&path)))
|
||||
nsCAutoString path;
|
||||
if(NS_FAILED(aFile->GetNativePath(path)))
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
uint32 oldoptions = JS_GetOptions(cx);
|
||||
@ -125,7 +125,7 @@ NS_IMETHODIMP nsXPCToolsCompiler::CompileFile(nsILocalFile *aFile, PRBool strict
|
||||
JSErrorReporter older = JS_SetErrorReporter(cx, ErrorReporter);
|
||||
JSExceptionState *es =JS_SaveExceptionState(cx);
|
||||
|
||||
if(!JS_CompileFileHandle(cx, glob, path, handle))
|
||||
if(!JS_CompileFileHandle(cx, glob, path.get(), handle))
|
||||
{
|
||||
jsval v;
|
||||
JSErrorReport* report;
|
||||
@ -152,7 +152,5 @@ NS_IMETHODIMP nsXPCToolsCompiler::CompileFile(nsILocalFile *aFile, PRBool strict
|
||||
JS_SetErrorReporter(cx, older);
|
||||
JS_SetOptions(cx, oldoptions);
|
||||
|
||||
if(path)
|
||||
nsMemory::Free(path);
|
||||
return NS_OK;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user