Bug 774978 - Profiler saving restored to /sdcard because most appfolder are read protected. r=glandium

This commit is contained in:
Benoit Girard 2012-07-24 13:29:59 -04:00
parent 3b4c458596
commit dbd5343d95

View File

@ -454,6 +454,10 @@ public:
t->SetPaused(true);
// Get file path
#ifdef ANDROID
nsCString tmpPath;
tmpPath.AppendPrintf("/sdcard/profile_%i_%i.txt", XRE_GetProcessType(), getpid());
#else
nsCOMPtr<nsIFile> tmpFile;
nsCAutoString tmpPath;
if (NS_FAILED(NS_GetSpecialDirectory(NS_OS_TEMP_DIR, getter_AddRefs(tmpFile)))) {
@ -469,6 +473,7 @@ public:
rv = tmpFile->GetNativePath(tmpPath);
if (NS_FAILED(rv))
return rv;
#endif
// Create a JSContext to run a JSObjectBuilder :(
// Based on XPCShellEnvironment