Compare commits
184 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
799473cddd | ||
|
|
721e87200e | ||
|
|
be3317bc53 | ||
|
|
90cdbfa41d | ||
|
|
656d9078e2 | ||
|
|
3608d371a5 | ||
|
|
dedebcc1f7 | ||
|
|
36e54a1e24 | ||
|
|
ec4a6e9310 | ||
|
|
1299889d39 | ||
|
|
f0c6414b60 | ||
|
|
5aa49f3472 | ||
|
|
f4ed118ce9 | ||
|
|
60bbba63be | ||
|
|
078871b9d0 | ||
|
|
9926729efe | ||
|
|
355332afb1 | ||
|
|
998d1df3b6 | ||
|
|
caeb8b7b70 | ||
|
|
05a100edbf | ||
|
|
8f10697eaf | ||
|
|
97e3e8e361 | ||
|
|
fcb40580a9 | ||
|
|
197a6537ee | ||
|
|
fd7866ba13 | ||
|
|
5ae495fd5c | ||
|
|
104f4ba570 | ||
|
|
af1aad65f1 | ||
|
|
dfdecde2b9 | ||
|
|
f5c38e0137 | ||
|
|
588fddfcfc | ||
|
|
a0580a0bd8 | ||
|
|
efb9904808 | ||
|
|
db9aa28762 | ||
|
|
a361a147c0 | ||
|
|
f6cc1db865 | ||
|
|
0d6f3cd8d7 | ||
|
|
ea81758d7c | ||
|
|
c535c4cbfa | ||
|
|
30c26d6d0b | ||
|
|
8017ba78f5 | ||
|
|
5aaaab18aa | ||
|
|
3949c148c5 | ||
|
|
c28fb475f7 | ||
|
|
27bff7ab6a | ||
|
|
a0e96f51f1 | ||
|
|
cf90f2c273 | ||
|
|
afc4529c23 | ||
|
|
f0c48f3d46 | ||
|
|
ae52963c01 | ||
|
|
8635c3cfa2 | ||
|
|
1dcae4348c | ||
|
|
1a7516497d | ||
|
|
358d1af0a7 | ||
|
|
9074bae1b7 | ||
|
|
b3f5bd9183 | ||
|
|
0f5045a2d0 | ||
|
|
6d218d94f1 | ||
|
|
2b71a87972 | ||
|
|
3d2636a821 | ||
|
|
7f9652e14c | ||
|
|
9cf1033e4f | ||
|
|
e114c4ce35 | ||
|
|
7cbd0f1cf0 | ||
|
|
684b0b294b | ||
|
|
6f337301cf | ||
|
|
0526f46e39 | ||
|
|
ea2e3fdf40 | ||
|
|
c2bf3f219f | ||
|
|
695b530a4c | ||
| 8d52315988 | |||
|
|
64b56134de | ||
|
|
96a4e596aa | ||
|
|
53dce40c72 | ||
|
|
d8024036fc | ||
|
|
c3194b00b1 | ||
|
|
532901fae2 | ||
|
|
38ad2205d5 | ||
|
|
ece8da2a59 | ||
|
|
8a38004b2b | ||
|
|
231d5e59da | ||
|
|
4efab6c15b | ||
|
|
e0f2fccf17 | ||
|
|
9fb1131d75 | ||
|
|
82c583ffad | ||
|
|
be48b2ad62 | ||
|
|
0f795bf5e0 | ||
|
|
b29fbba698 | ||
|
|
659e2b5aef | ||
|
|
d0375898df | ||
|
|
3c98b7050f | ||
|
|
4ea9ee657c | ||
|
|
7b0dff9531 | ||
|
|
7fedb506fc | ||
|
|
3662bd7cb2 | ||
|
|
a905724c2d | ||
|
|
814f8924c4 | ||
|
|
dbfd8fbda5 | ||
|
|
03c0aed20d | ||
|
|
17814399f6 | ||
|
|
cb8a01c564 | ||
|
|
ed267cf181 | ||
|
|
22b2e65bcf | ||
|
|
2239a6adee | ||
|
|
8ede93a5a4 | ||
|
|
4ed011db11 | ||
|
|
caefd61af5 | ||
|
|
017429f731 | ||
|
|
3a484e7fcd | ||
|
|
dbeface255 | ||
|
|
7f1f78be59 | ||
|
|
8b10ed3072 | ||
|
|
4de5e6b42e | ||
|
|
3883b0733b | ||
|
|
c37ce403ff | ||
|
|
b70d8a4e55 | ||
|
|
3bf05d8203 | ||
|
|
9b39528c23 | ||
|
|
843eff4452 | ||
|
|
435df8caa0 | ||
|
|
7f16336b7f | ||
|
|
8d501e5c5e | ||
|
|
f14bf57641 | ||
|
|
e1c89329dc | ||
|
|
bcd0b40902 | ||
|
|
f2b9d9294e | ||
|
|
b434782fd6 | ||
|
|
c8142c6a94 | ||
|
|
480cf5fab9 | ||
|
|
29350dbceb | ||
|
|
d4a72524ef | ||
|
|
e324314511 | ||
|
|
5e7e915b14 | ||
|
|
883ddfc115 | ||
|
|
5758cbe039 | ||
|
|
0ab4ac95f0 | ||
|
|
4d209f0963 | ||
|
|
8f6b7dddbe | ||
|
|
7297948163 | ||
|
|
c46ce8e0ff | ||
|
|
a65e727577 | ||
|
|
0a3e284277 | ||
|
|
0d3bcbc36d | ||
|
|
06dfb19183 | ||
|
|
e388263eb6 | ||
|
|
cf4d956b90 | ||
|
|
ed5ed8e897 | ||
|
|
c8ab32f987 | ||
|
|
a7ff42cf22 | ||
|
|
2657453d6b | ||
|
|
ddf606097f | ||
|
|
052f8ddfed | ||
|
|
bd2669f723 | ||
|
|
2c2ab4fec5 | ||
|
|
e958266d92 | ||
|
|
6bf8d6eda0 | ||
|
|
50bcf53640 | ||
|
|
7755ed100a | ||
|
|
e404a52b7e | ||
|
|
48e6730266 | ||
|
|
b2577c78d8 | ||
|
|
a6a6497fda | ||
|
|
1a886127f7 | ||
|
|
747e7fbbc8 | ||
|
|
0d5f644e5e | ||
|
|
e8797681fc | ||
|
|
689d99011f | ||
|
|
7b2f50bd87 | ||
|
|
d3cfadc7fa | ||
|
|
0a3fc71e30 | ||
|
|
76cde3aca7 | ||
|
|
16b10b81e1 | ||
|
|
163c167d1d | ||
|
|
1d0c1d7887 | ||
|
|
3b6649ae7e | ||
|
|
bf568afb23 | ||
|
|
faf2784516 | ||
|
|
1a7d8df727 | ||
|
|
38dfdbf9ef | ||
|
|
faa42aacfe | ||
|
|
55bbfab739 | ||
|
|
4bb7a10deb | ||
|
|
c81a4e0546 | ||
|
|
d35150669e |
19 changed files with 1 additions and 2699 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -1,2 +0,0 @@
|
|||
/firefox-*.source.tar.bz2
|
||||
/xulrunner-*.source.tar.bz2
|
||||
1
dead.package
Normal file
1
dead.package
Normal file
|
|
@ -0,0 +1 @@
|
|||
This package is no longer supported by upstream
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
diff -up xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/libxul-embedding.pc.in.pk xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/libxul-embedding.pc.in
|
||||
--- xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/libxul-embedding.pc.in.pk 2010-08-06 03:09:24.000000000 +0200
|
||||
+++ xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/libxul-embedding.pc.in 2010-08-16 11:12:32.000000000 +0200
|
||||
@@ -6,5 +6,6 @@ idldir=%idldir%
|
||||
Name: libxul-embedding
|
||||
Description: Static library for version-independent embedding of the Mozilla runtime
|
||||
Version: %MOZILLA_VERSION%
|
||||
+Requires: %NSPR_NAME% >= %NSPR_VERSION%
|
||||
Libs: -L${sdkdir}/lib -lxpcomglue -ldl
|
||||
Cflags: -DXPCOM_GLUE -I${includedir} %WCHAR_CFLAGS%
|
||||
diff -up xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/libxul.pc.in.pk xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/libxul.pc.in
|
||||
--- xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/libxul.pc.in.pk 2010-08-06 03:09:24.000000000 +0200
|
||||
+++ xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/libxul.pc.in 2010-08-16 11:07:52.000000000 +0200
|
||||
@@ -2,6 +2,7 @@ prefix=%prefix%
|
||||
sdkdir=%sdkdir%
|
||||
includedir=%includedir%
|
||||
idldir=%idldir%
|
||||
+libdir=%libdir%
|
||||
|
||||
Name: libxul
|
||||
Description: The Mozilla Runtime and Embedding Engine
|
||||
diff -up xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/Makefile.in.pk xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/Makefile.in
|
||||
--- xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/Makefile.in.pk 2010-08-16 11:07:52.000000000 +0200
|
||||
+++ xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/Makefile.in 2010-08-16 11:07:52.000000000 +0200
|
||||
@@ -116,6 +116,7 @@ endif
|
||||
-e "s|%includedir%|$(includedir)|" \
|
||||
-e "s|%idldir%|$(idldir)|" \
|
||||
-e "s|%sdkdir%|$(sdkdir)|" \
|
||||
+ -e "s|%libdir%|$(installdir)|" \
|
||||
-e "s|%MOZ_APP_NAME%|$(MOZ_APP_NAME)|" \
|
||||
-e "s|%MOZILLA_VERSION%|$(MOZ_APP_VERSION)|" \
|
||||
-e "s|%WCHAR_CFLAGS%|$(WCHAR_CFLAGS)|" \
|
||||
|
|
@ -1,483 +0,0 @@
|
|||
# HG changeset patch
|
||||
# Parent cb34bd8957ec517c72d506f7c439e3af1950e38d
|
||||
# User Martin Stransky <stransky@redhat.com>
|
||||
Bug 239254 - [Linux] Support disk cache on a local path, r=michal.novotny
|
||||
|
||||
diff --git a/netwerk/cache/nsCacheService.cpp b/netwerk/cache/nsCacheService.cpp
|
||||
--- a/netwerk/cache/nsCacheService.cpp
|
||||
+++ b/netwerk/cache/nsCacheService.cpp
|
||||
@@ -712,27 +712,18 @@ nsCacheProfilePrefObserver::ReadPrefs(ns
|
||||
nsCOMPtr<nsIFile> profDir;
|
||||
NS_GetSpecialDirectory(NS_APP_USER_PROFILE_50_DIR,
|
||||
getter_AddRefs(profDir));
|
||||
NS_GetSpecialDirectory(NS_APP_USER_PROFILE_LOCAL_50_DIR,
|
||||
getter_AddRefs(directory));
|
||||
if (!directory)
|
||||
directory = profDir;
|
||||
else if (profDir) {
|
||||
- bool same;
|
||||
- if (NS_SUCCEEDED(profDir->Equals(directory, &same)) && !same) {
|
||||
- // We no longer store the cache directory in the main
|
||||
- // profile directory, so we should cleanup the old one.
|
||||
- rv = profDir->AppendNative(NS_LITERAL_CSTRING("Cache"));
|
||||
- if (NS_SUCCEEDED(rv)) {
|
||||
- bool exists;
|
||||
- if (NS_SUCCEEDED(profDir->Exists(&exists)) && exists)
|
||||
- nsDeleteDir::DeleteDir(profDir, false);
|
||||
- }
|
||||
- }
|
||||
+ nsCacheService::MoveOrRemoveDiskCache(profDir, directory,
|
||||
+ "Cache");
|
||||
}
|
||||
}
|
||||
// use file cache in build tree only if asked, to avoid cache dir litter
|
||||
if (!directory && PR_GetEnv("NECKO_DEV_ENABLE_DISK_CACHE")) {
|
||||
rv = NS_GetSpecialDirectory(NS_XPCOM_CURRENT_PROCESS_DIR,
|
||||
getter_AddRefs(directory));
|
||||
}
|
||||
if (directory)
|
||||
@@ -788,16 +779,20 @@ nsCacheProfilePrefObserver::ReadPrefs(ns
|
||||
// try to get the profile directory (there may not be a profile yet)
|
||||
nsCOMPtr<nsIFile> profDir;
|
||||
NS_GetSpecialDirectory(NS_APP_USER_PROFILE_50_DIR,
|
||||
getter_AddRefs(profDir));
|
||||
NS_GetSpecialDirectory(NS_APP_USER_PROFILE_LOCAL_50_DIR,
|
||||
getter_AddRefs(directory));
|
||||
if (!directory)
|
||||
directory = profDir;
|
||||
+ else if (profDir) {
|
||||
+ nsCacheService::MoveOrRemoveDiskCache(profDir, directory,
|
||||
+ "OfflineCache");
|
||||
+ }
|
||||
}
|
||||
#if DEBUG
|
||||
if (!directory) {
|
||||
// use current process directory during development
|
||||
rv = NS_GetSpecialDirectory(NS_XPCOM_CURRENT_PROCESS_DIR,
|
||||
getter_AddRefs(directory));
|
||||
}
|
||||
#endif
|
||||
@@ -3012,16 +3007,67 @@ nsCacheService::SetDiskSmartSize_Locked(
|
||||
DispatchToCacheIOThread(event);
|
||||
} else {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
+void
|
||||
+nsCacheService::MoveOrRemoveDiskCache(nsIFile *aOldCacheDir,
|
||||
+ nsIFile *aNewCacheDir,
|
||||
+ const char *aCacheSubdir)
|
||||
+{
|
||||
+ bool same;
|
||||
+ if (NS_FAILED(aOldCacheDir->Equals(aNewCacheDir, &same)) || same)
|
||||
+ return;
|
||||
+
|
||||
+ nsCOMPtr<nsIFile> aOldCacheSubdir;
|
||||
+ aOldCacheDir->Clone(getter_AddRefs(aOldCacheSubdir));
|
||||
+
|
||||
+ nsresult rv = aOldCacheSubdir->AppendNative(
|
||||
+ nsDependentCString(aCacheSubdir));
|
||||
+ if (NS_FAILED(rv))
|
||||
+ return;
|
||||
+
|
||||
+ bool exists;
|
||||
+ if (NS_FAILED(aOldCacheSubdir->Exists(&exists)) || !exists)
|
||||
+ return;
|
||||
+
|
||||
+ nsCOMPtr<nsIFile> aNewCacheSubdir;
|
||||
+ aNewCacheDir->Clone(getter_AddRefs(aNewCacheSubdir));
|
||||
+
|
||||
+ rv = aNewCacheSubdir->AppendNative(nsDependentCString(aCacheSubdir));
|
||||
+ if (NS_FAILED(rv))
|
||||
+ return;
|
||||
+
|
||||
+ nsAutoCString newPath;
|
||||
+ rv = aNewCacheSubdir->GetNativePath(newPath);
|
||||
+ if (NS_FAILED(rv))
|
||||
+ return;
|
||||
+
|
||||
+ if (NS_SUCCEEDED(aNewCacheSubdir->Exists(&exists)) && !exists) {
|
||||
+ // New cache directory does not exist, try to move the old one here
|
||||
+ // rename needs an empty target directory
|
||||
+ rv = aNewCacheSubdir->Create(nsIFile::DIRECTORY_TYPE, 0777);
|
||||
+ if (NS_SUCCEEDED(rv)) {
|
||||
+ nsAutoCString oldPath;
|
||||
+ rv = aOldCacheSubdir->GetNativePath(oldPath);
|
||||
+ if (NS_FAILED(rv))
|
||||
+ return;
|
||||
+ if(rename(oldPath.get(), newPath.get()) == 0)
|
||||
+ return;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ // Delay delete by 1 minute to avoid IO thrash on startup.
|
||||
+ nsDeleteDir::DeleteDir(aOldCacheSubdir, false, 60000);
|
||||
+}
|
||||
+
|
||||
static bool
|
||||
IsEntryPrivate(nsCacheEntry* entry)
|
||||
{
|
||||
return entry->IsPrivate();
|
||||
}
|
||||
|
||||
void
|
||||
nsCacheService::LeavePrivateBrowsing()
|
||||
diff --git a/netwerk/cache/nsCacheService.h b/netwerk/cache/nsCacheService.h
|
||||
--- a/netwerk/cache/nsCacheService.h
|
||||
+++ b/netwerk/cache/nsCacheService.h
|
||||
@@ -194,16 +194,20 @@ public:
|
||||
|
||||
static void SetMemoryCache();
|
||||
|
||||
static void SetCacheCompressionLevel(int32_t level);
|
||||
|
||||
// Starts smart cache size computation if disk device is available
|
||||
static nsresult SetDiskSmartSize();
|
||||
|
||||
+ static void MoveOrRemoveDiskCache(nsIFile *aOldCacheDir,
|
||||
+ nsIFile *aNewCacheDir,
|
||||
+ const char *aCacheSubdir);
|
||||
+
|
||||
nsresult Init();
|
||||
void Shutdown();
|
||||
|
||||
static bool IsInitialized()
|
||||
{
|
||||
if (!gService) {
|
||||
return false;
|
||||
}
|
||||
diff --git a/startupcache/StartupCache.cpp b/startupcache/StartupCache.cpp
|
||||
--- a/startupcache/StartupCache.cpp
|
||||
+++ b/startupcache/StartupCache.cpp
|
||||
@@ -168,16 +168,30 @@ StartupCache::Init()
|
||||
nsCOMPtr<nsIFile> file;
|
||||
rv = NS_GetSpecialDirectory("ProfLDS",
|
||||
getter_AddRefs(file));
|
||||
if (NS_FAILED(rv)) {
|
||||
// return silently, this will fail in mochitests's xpcshell process.
|
||||
return rv;
|
||||
}
|
||||
|
||||
+ nsCOMPtr<nsIFile> profDir;
|
||||
+ NS_GetSpecialDirectory("ProfDS", getter_AddRefs(profDir));
|
||||
+ if (profDir) {
|
||||
+ bool same;
|
||||
+ if (NS_SUCCEEDED(profDir->Equals(file, &same)) && !same) {
|
||||
+ // We no longer store the startup cache in the main profile
|
||||
+ // directory, so we should cleanup the old one.
|
||||
+ if (NS_SUCCEEDED(
|
||||
+ profDir->AppendNative(NS_LITERAL_CSTRING("startupCache")))) {
|
||||
+ profDir->Remove(true);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
rv = file->AppendNative(NS_LITERAL_CSTRING("startupCache"));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
// Try to create the directory if it's not there yet
|
||||
rv = file->Create(nsIFile::DIRECTORY_TYPE, 0777);
|
||||
if (NS_FAILED(rv) && rv != NS_ERROR_FILE_ALREADY_EXISTS)
|
||||
return rv;
|
||||
|
||||
diff --git a/toolkit/xre/nsXREDirProvider.cpp b/toolkit/xre/nsXREDirProvider.cpp
|
||||
--- a/toolkit/xre/nsXREDirProvider.cpp
|
||||
+++ b/toolkit/xre/nsXREDirProvider.cpp
|
||||
@@ -1170,18 +1170,32 @@ nsXREDirProvider::GetUserDataDirectoryHo
|
||||
#elif defined(MOZ_WIDGET_GONK)
|
||||
rv = NS_NewNativeLocalFile(NS_LITERAL_CSTRING("/data/b2g"), true,
|
||||
getter_AddRefs(localDir));
|
||||
#elif defined(XP_UNIX)
|
||||
const char* homeDir = getenv("HOME");
|
||||
if (!homeDir || !*homeDir)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
- rv = NS_NewNativeLocalFile(nsDependentCString(homeDir), true,
|
||||
- getter_AddRefs(localDir));
|
||||
+ if (aLocal) {
|
||||
+ // If $XDG_CACHE_HOME is defined use it, otherwise use $HOME/.cache.
|
||||
+ const char* cacheHome = getenv("XDG_CACHE_HOME");
|
||||
+ if (cacheHome && *cacheHome) {
|
||||
+ rv = NS_NewNativeLocalFile(nsDependentCString(cacheHome), true,
|
||||
+ getter_AddRefs(localDir));
|
||||
+ } else {
|
||||
+ rv = NS_NewNativeLocalFile(nsDependentCString(homeDir), true,
|
||||
+ getter_AddRefs(localDir));
|
||||
+ if (NS_SUCCEEDED(rv))
|
||||
+ rv = localDir->AppendNative(NS_LITERAL_CSTRING(".cache"));
|
||||
+ }
|
||||
+ } else {
|
||||
+ rv = NS_NewNativeLocalFile(nsDependentCString(homeDir), true,
|
||||
+ getter_AddRefs(localDir));
|
||||
+ }
|
||||
#else
|
||||
#error "Don't know how to get product dir on your platform"
|
||||
#endif
|
||||
|
||||
NS_IF_ADDREF(*aFile = localDir);
|
||||
return rv;
|
||||
}
|
||||
|
||||
@@ -1256,17 +1270,17 @@ nsXREDirProvider::GetUserDataDirectory(n
|
||||
const nsACString* aProfileName,
|
||||
const nsACString* aAppName,
|
||||
const nsACString* aVendorName)
|
||||
{
|
||||
nsCOMPtr<nsIFile> localDir;
|
||||
nsresult rv = GetUserDataDirectoryHome(getter_AddRefs(localDir), aLocal);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
- rv = AppendProfilePath(localDir, aProfileName, aAppName, aVendorName);
|
||||
+ rv = AppendProfilePath(localDir, aProfileName, aAppName, aVendorName, aLocal);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
#ifdef DEBUG_jungshik
|
||||
nsAutoCString cwd;
|
||||
localDir->GetNativePath(cwd);
|
||||
printf("nsXREDirProvider::GetUserDataDirectory: %s\n", cwd.get());
|
||||
#endif
|
||||
rv = EnsureDirectoryExists(localDir);
|
||||
@@ -1377,17 +1391,18 @@ nsXREDirProvider::AppendSysUserExtension
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
nsresult
|
||||
nsXREDirProvider::AppendProfilePath(nsIFile* aFile,
|
||||
const nsACString* aProfileName,
|
||||
const nsACString* aAppName,
|
||||
- const nsACString* aVendorName)
|
||||
+ const nsACString* aVendorName,
|
||||
+ bool aLocal)
|
||||
{
|
||||
NS_ASSERTION(aFile, "Null pointer!");
|
||||
|
||||
if (!gAppData) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
nsAutoCString profile;
|
||||
@@ -1439,28 +1454,31 @@ nsXREDirProvider::AppendProfilePath(nsIF
|
||||
// The parent of this directory is set in GetUserDataDirectoryHome
|
||||
// XXX: handle gAppData->profile properly
|
||||
// XXXsmaug ...and the rest of the profile creation!
|
||||
MOZ_ASSERT(!aAppName,
|
||||
"Profile creation for external applications is not implemented!");
|
||||
rv = aFile->AppendNative(nsDependentCString("mozilla"));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
#elif defined(XP_UNIX)
|
||||
- // Make it hidden (i.e. using the ".")
|
||||
- nsAutoCString folder(".");
|
||||
+ nsAutoCString folder;
|
||||
+ // Make it hidden (by starting with "."), except when local (the
|
||||
+ // profile is already under ~/.cache or XDG_CACHE_HOME).
|
||||
+ if (!aLocal)
|
||||
+ folder.Assign('.');
|
||||
|
||||
if (!profile.IsEmpty()) {
|
||||
// Skip any leading path characters
|
||||
const char* profileStart = profile.get();
|
||||
while (*profileStart == '/' || *profileStart == '\\')
|
||||
profileStart++;
|
||||
|
||||
// On the off chance that someone wanted their folder to be hidden don't
|
||||
// let it become ".."
|
||||
- if (*profileStart == '.')
|
||||
+ if (*profileStart == '.' && !aLocal)
|
||||
profileStart++;
|
||||
|
||||
folder.Append(profileStart);
|
||||
ToLowerCase(folder);
|
||||
|
||||
rv = AppendProfileString(aFile, folder.BeginReading());
|
||||
}
|
||||
else {
|
||||
diff --git a/toolkit/xre/nsXREDirProvider.h b/toolkit/xre/nsXREDirProvider.h
|
||||
--- a/toolkit/xre/nsXREDirProvider.h
|
||||
+++ b/toolkit/xre/nsXREDirProvider.h
|
||||
@@ -109,17 +109,18 @@ protected:
|
||||
static nsresult EnsureDirectoryExists(nsIFile* aDirectory);
|
||||
void EnsureProfileFileExists(nsIFile* aFile);
|
||||
|
||||
// Determine the profile path within the UAppData directory. This is different
|
||||
// on every major platform.
|
||||
static nsresult AppendProfilePath(nsIFile* aFile,
|
||||
const nsACString* aProfileName,
|
||||
const nsACString* aAppName,
|
||||
- const nsACString* aVendorName);
|
||||
+ const nsACString* aVendorName,
|
||||
+ bool aLocal);
|
||||
|
||||
static nsresult AppendSysUserExtensionPath(nsIFile* aFile);
|
||||
|
||||
// Internal helper that splits a path into components using the '/' and '\\'
|
||||
// delimiters.
|
||||
static inline nsresult AppendProfileString(nsIFile* aFile, const char* aPath);
|
||||
|
||||
// Calculate and register extension and theme bundle directories.
|
||||
# HG changeset patch
|
||||
# User Tim Taubert <ttaubert@mozilla.com>
|
||||
# Date 1360362227 -3600
|
||||
# Node ID 873170d2679ac23114f22543cee3214a940abef3
|
||||
Bug 239254 - [Linux] Migrate existing thumbnails to their new local path
|
||||
|
||||
diff --git a/browser/components/thumbnails/PageThumbs.jsm b/browser/components/thumbnails/PageThumbs.jsm
|
||||
--- a/browser/components/thumbnails/PageThumbs.jsm
|
||||
+++ b/browser/components/thumbnails/PageThumbs.jsm
|
||||
@@ -7,17 +7,17 @@
|
||||
this.EXPORTED_SYMBOLS = ["PageThumbs", "PageThumbsStorage"];
|
||||
|
||||
const Cu = Components.utils;
|
||||
const Cc = Components.classes;
|
||||
const Ci = Components.interfaces;
|
||||
|
||||
const HTML_NAMESPACE = "http://www.w3.org/1999/xhtml";
|
||||
const PREF_STORAGE_VERSION = "browser.pagethumbnails.storage_version";
|
||||
-const LATEST_STORAGE_VERSION = 2;
|
||||
+const LATEST_STORAGE_VERSION = 3;
|
||||
|
||||
const EXPIRATION_MIN_CHUNK_SIZE = 50;
|
||||
const EXPIRATION_INTERVAL_SECS = 3600;
|
||||
|
||||
/**
|
||||
* Name of the directory in the profile that contains the thumbnails.
|
||||
*/
|
||||
const THUMBNAIL_DIRECTORY = "thumbnails";
|
||||
@@ -359,47 +359,51 @@ let PageThumbsStorageMigrator = {
|
||||
|
||||
set currentVersion(aVersion) {
|
||||
Services.prefs.setIntPref(PREF_STORAGE_VERSION, aVersion);
|
||||
},
|
||||
|
||||
migrate: function Migrator_migrate() {
|
||||
let version = this.currentVersion;
|
||||
|
||||
- if (version < 1) {
|
||||
- this.removeThumbnailsFromRoamingProfile();
|
||||
- }
|
||||
- if (version < 2) {
|
||||
- this.renameThumbnailsFolder();
|
||||
+ // Storage version 1 never made it to beta.
|
||||
+ // At the time of writing only Windows had (ProfD != ProfLD) and we
|
||||
+ // needed to move thumbnails from the roaming profile to the locale
|
||||
+ // one so that they're not needlessly included in backups and/or
|
||||
+ // written via SMB.
|
||||
+
|
||||
+ // Storage version 2 also never made it to beta.
|
||||
+ // The thumbnail folder structure has been changed and old thumbnails
|
||||
+ // were not migrated. Instead, we just renamed the current folder to
|
||||
+ // "<name>-old" and will remove it later.
|
||||
+
|
||||
+ if (version < 3) {
|
||||
+ this.migrateToVersion3();
|
||||
}
|
||||
|
||||
this.currentVersion = LATEST_STORAGE_VERSION;
|
||||
},
|
||||
|
||||
- removeThumbnailsFromRoamingProfile:
|
||||
- function Migrator_removeThumbnailsFromRoamingProfile() {
|
||||
- let local = FileUtils.getDir("ProfLD", [THUMBNAIL_DIRECTORY]);
|
||||
+ /**
|
||||
+ * Bug 239254 added support for having the disk cache and thumbnail
|
||||
+ * directories on a local path (i.e. ~/.cache/) under Linux. We'll first
|
||||
+ * try to move the old thumbnails to their new location. If that's not
|
||||
+ * possible (because ProfD might be on a different file system than
|
||||
+ * ProfLD) we'll just discard them.
|
||||
+ */
|
||||
+ migrateToVersion3: function Migrator_migrateToVersion3() {
|
||||
+ let local = FileUtils.getDir("ProfLD", [THUMBNAIL_DIRECTORY], true);
|
||||
let roaming = FileUtils.getDir("ProfD", [THUMBNAIL_DIRECTORY]);
|
||||
|
||||
- if (!roaming.equals(local) && roaming.exists()) {
|
||||
- roaming.followLinks = false;
|
||||
- try {
|
||||
- roaming.remove(true);
|
||||
- } catch (e) {
|
||||
- // The directory might not exist or we're not permitted to remove it.
|
||||
- }
|
||||
- }
|
||||
- },
|
||||
-
|
||||
- renameThumbnailsFolder: function Migrator_renameThumbnailsFolder() {
|
||||
- let dir = FileUtils.getDir("ProfLD", [THUMBNAIL_DIRECTORY]);
|
||||
- try {
|
||||
- dir.moveTo(null, dir.leafName + "-old");
|
||||
- } catch (e) {
|
||||
- // The directory might not exist or we're not permitted to rename it.
|
||||
+ if (!roaming.equals(local)) {
|
||||
+ PageThumbsWorker.postMessage({
|
||||
+ type: "moveOrDeleteAllThumbnails",
|
||||
+ from: roaming.path,
|
||||
+ to: local.path
|
||||
+ });
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
let PageThumbsExpiration = {
|
||||
_filters: [],
|
||||
|
||||
init: function Expiration_init() {
|
||||
diff --git a/browser/components/thumbnails/PageThumbsWorker.js b/browser/components/thumbnails/PageThumbsWorker.js
|
||||
--- a/browser/components/thumbnails/PageThumbsWorker.js
|
||||
+++ b/browser/components/thumbnails/PageThumbsWorker.js
|
||||
@@ -20,16 +20,19 @@ let PageThumbsWorker = {
|
||||
|
||||
switch (msg.type) {
|
||||
case "removeFile":
|
||||
data.result = this.removeFile(msg);
|
||||
break;
|
||||
case "expireFilesInDirectory":
|
||||
data.result = this.expireFilesInDirectory(msg);
|
||||
break;
|
||||
+ case "moveOrDeleteAllThumbnails":
|
||||
+ data.result = this.moveOrDeleteAllThumbnails(msg);
|
||||
+ break;
|
||||
default:
|
||||
data.result = false;
|
||||
data.detail = "message not understood";
|
||||
break;
|
||||
}
|
||||
|
||||
self.postMessage(data);
|
||||
},
|
||||
@@ -62,12 +65,35 @@ let PageThumbsWorker = {
|
||||
getFileEntriesInDirectory:
|
||||
function Worker_getFileEntriesInDirectory(aPath, aSkipFiles) {
|
||||
let skip = new Set(aSkipFiles);
|
||||
let iter = new OS.File.DirectoryIterator(aPath);
|
||||
|
||||
return [entry
|
||||
for (entry in iter)
|
||||
if (!entry.isDir && !entry.isSymLink && !skip.has(entry.name))];
|
||||
+ },
|
||||
+
|
||||
+ moveOrDeleteAllThumbnails:
|
||||
+ function Worker_moveOrDeleteAllThumbnails(msg) {
|
||||
+ if (!OS.File.exists(msg.from))
|
||||
+ return true;
|
||||
+
|
||||
+ let iter = new OS.File.DirectoryIterator(msg.from);
|
||||
+ for (let entry in iter) {
|
||||
+ if (!entry.isDir && !entry.isSymLink) {
|
||||
+ let from = OS.Path.join(msg.from, entry.name);
|
||||
+ let to = OS.Path.join(msg.to, entry.name);
|
||||
+
|
||||
+ try {
|
||||
+ OS.File.move(from, to, {noOverwrite: true, noCopy: true});
|
||||
+ } catch (e) {
|
||||
+ OS.File.remove(from);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ OS.File.removeEmptyDir(msg.from);
|
||||
+ return true;
|
||||
}
|
||||
};
|
||||
|
||||
self.onmessage = PageThumbsWorker.handleMessage.bind(PageThumbsWorker);
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
--- a/toolkit/mozapps/installer/packager.mk
|
||||
+++ b/toolkit/mozapps/installer/packager.mk
|
||||
@@ -621,10 +621,12 @@ ifdef INSTALL_SDK # Here comes the hard
|
||||
(cd $(DESTDIR)$(idldir) && tar -xf -)
|
||||
# SDK directory is the libs + a bunch of symlinks
|
||||
$(NSINSTALL) -D $(DESTDIR)$(sdkdir)/sdk/lib
|
||||
+ $(NSINSTALL) -D $(DESTDIR)$(sdkdir)/sdk/bin
|
||||
if test -f $(DIST)/include/xpcom-config.h; then \
|
||||
$(SYSINSTALL) $(IFLAGS1) $(DIST)/include/xpcom-config.h $(DESTDIR)$(sdkdir); \
|
||||
fi
|
||||
(cd $(DIST)/sdk/lib && tar $(TAR_CREATE_FLAGS) - .) | (cd $(DESTDIR)$(sdkdir)/sdk/lib && tar -xf -)
|
||||
+ (cd $(DIST)/sdk/bin && tar $(TAR_CREATE_FLAGS) - .) | (cd $(DESTDIR)$(sdkdir)/sdk/bin && tar -xf -)
|
||||
$(RM) -f $(DESTDIR)$(sdkdir)/lib $(DESTDIR)$(sdkdir)/bin $(DESTDIR)$(sdkdir)/include $(DESTDIR)$(sdkdir)/include $(DESTDIR)$(sdkdir)/sdk/idl $(DESTDIR)$(sdkdir)/idl
|
||||
ln -s $(sdkdir)/sdk/lib $(DESTDIR)$(sdkdir)/lib
|
||||
ln -s $(installdir) $(DESTDIR)$(sdkdir)/bin
|
||||
|
|
@ -1,46 +0,0 @@
|
|||
# HG changeset patch
|
||||
# Parent 3523e7f7a89d7933c5f1dc8f5f22559b48ec44c4
|
||||
diff --git a/netwerk/base/src/nsIOService.cpp b/netwerk/base/src/nsIOService.cpp
|
||||
--- a/netwerk/base/src/nsIOService.cpp
|
||||
+++ b/netwerk/base/src/nsIOService.cpp
|
||||
@@ -818,17 +818,18 @@ nsIOService::PrefsChanged(nsIPrefBranch
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
if (mSocketTransportService)
|
||||
mSocketTransportService->SetAutodialEnabled(enableAutodial);
|
||||
}
|
||||
}
|
||||
|
||||
if (!pref || strcmp(pref, MANAGE_OFFLINE_STATUS_PREF) == 0) {
|
||||
bool manage;
|
||||
- if (NS_SUCCEEDED(prefs->GetBoolPref(MANAGE_OFFLINE_STATUS_PREF,
|
||||
+ if (mNetworkLinkServiceInitialized &&
|
||||
+ NS_SUCCEEDED(prefs->GetBoolPref(MANAGE_OFFLINE_STATUS_PREF,
|
||||
&manage)))
|
||||
SetManageOfflineStatus(manage);
|
||||
}
|
||||
|
||||
if (!pref || strcmp(pref, NECKO_BUFFER_CACHE_COUNT_PREF) == 0) {
|
||||
int32_t count;
|
||||
if (NS_SUCCEEDED(prefs->GetIntPref(NECKO_BUFFER_CACHE_COUNT_PREF,
|
||||
&count)))
|
||||
@@ -928,16 +929,20 @@ nsIOService::Observe(nsISupports *subjec
|
||||
}
|
||||
else if (!strcmp(topic, kProfileDoChange)) {
|
||||
if (data && NS_LITERAL_STRING("startup").Equals(data)) {
|
||||
// Lazy initialization of network link service (see bug 620472)
|
||||
InitializeNetworkLinkService();
|
||||
// Set up the initilization flag regardless the actuall result.
|
||||
// If we fail here, we will fail always on.
|
||||
mNetworkLinkServiceInitialized = true;
|
||||
+ // And now reflect the preference setting
|
||||
+ nsCOMPtr<nsIPrefBranch> prefBranch;
|
||||
+ GetPrefBranch(getter_AddRefs(prefBranch));
|
||||
+ PrefsChanged(prefBranch, MANAGE_OFFLINE_STATUS_PREF);
|
||||
}
|
||||
}
|
||||
else if (!strcmp(topic, NS_XPCOM_SHUTDOWN_OBSERVER_ID)) {
|
||||
// Remember we passed XPCOM shutdown notification to prevent any
|
||||
// changes of the offline status from now. We must not allow going
|
||||
// online after this point.
|
||||
mShutdown = true;
|
||||
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
diff -up mozilla-aurora-7676a9a06403/security/build/Makefile.in.build mozilla-aurora-7676a9a06403/security/build/Makefile.in
|
||||
--- mozilla-aurora-7676a9a06403/security/build/Makefile.in.build 2012-09-13 14:18:35.000000000 +0200
|
||||
+++ mozilla-aurora-7676a9a06403/security/build/Makefile.in 2012-09-18 10:58:45.560063613 +0200
|
||||
@@ -139,7 +139,6 @@ DEFAULT_GMAKE_FLAGS += NSPR_INCLUDE_DIR=
|
||||
DEFAULT_GMAKE_FLAGS += NSPR_LIB_DIR=$(NSPR_LIB_DIR)
|
||||
DEFAULT_GMAKE_FLAGS += MOZILLA_CLIENT=1
|
||||
DEFAULT_GMAKE_FLAGS += NO_MDUPDATE=1
|
||||
-DEFAULT_GMAKE_FLAGS += NSS_ENABLE_ECC=1
|
||||
DEFAULT_GMAKE_FLAGS += NSINSTALL="$(NSINSTALL)"
|
||||
ifndef MOZ_NATIVE_SQLITE
|
||||
DEFAULT_GMAKE_FLAGS += SQLITE_LIB_NAME=mozsqlite3
|
||||
diff -up mozilla-aurora-7676a9a06403/security/manager/Makefile.in.build mozilla-aurora-7676a9a06403/security/manager/Makefile.in
|
||||
diff -up mozilla-aurora-7676a9a06403/security/manager/ssl/src/Makefile.in.build mozilla-aurora-7676a9a06403/security/manager/ssl/src/Makefile.in
|
||||
--- mozilla-aurora-7676a9a06403/security/manager/ssl/src/Makefile.in.build 2012-09-13 14:18:35.000000000 +0200
|
||||
+++ mozilla-aurora-7676a9a06403/security/manager/ssl/src/Makefile.in 2012-09-18 10:54:16.310505794 +0200
|
||||
@@ -84,7 +84,6 @@ CSRCS += md4.c
|
||||
EXTRA_DEPS = $(NSS_DEP_LIBS)
|
||||
|
||||
DEFINES += \
|
||||
- -DNSS_ENABLE_ECC \
|
||||
-DDLL_PREFIX=\"$(DLL_PREFIX)\" \
|
||||
-DDLL_SUFFIX=\"$(DLL_SUFFIX)\" \
|
||||
$(NULL)
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
diff -up firefox-18.0/mozilla-release/media/webrtc/trunk/Makefile.old firefox-18.0/mozilla-release/media/webrtc/trunk/Makefile
|
||||
diff -up firefox-18.0/mozilla-release/media/webrtc/trunk/tools/gyp/pylib/gyp/generator/mozmake.py.old firefox-18.0/mozilla-release/media/webrtc/trunk/tools/gyp/pylib/gyp/generator/mozmake.py
|
||||
--- firefox-18.0/mozilla-release/media/webrtc/trunk/tools/gyp/pylib/gyp/generator/mozmake.py.old 2013-01-05 00:44:41.000000000 +0100
|
||||
+++ firefox-18.0/mozilla-release/media/webrtc/trunk/tools/gyp/pylib/gyp/generator/mozmake.py 2013-01-10 14:48:58.418321640 +0100
|
||||
@@ -376,7 +376,7 @@ class MakefileGenerator(object):
|
||||
WriteMakefile(output_file, data, build_file, depth, top,
|
||||
# we set srcdir up one directory, since the subdir
|
||||
# doesn't actually exist in the source directory
|
||||
- swapslashes(os.path.join(top, self.relative_srcdir, os.path.split(rel_path)[0])),
|
||||
+ swapslashes(os.path.normpath(os.path.join(top, self.relative_srcdir, os.path.split(rel_path)[0]))),
|
||||
self.relative_srcdir)
|
||||
return True
|
||||
|
||||
|
|
@ -1,547 +0,0 @@
|
|||
Use the runtime page size to control arena decommit (RHBZ#911314)
|
||||
Return success when decommit is disabled
|
||||
|
||||
Author: Gustavo Luiz Duarte <gustavold@linux.vnet.ibm.com>
|
||||
Based on Terrence Cole's patch v0 on MOZ#840242
|
||||
|
||||
Index: mozilla-release/js/src/gc/Heap.h
|
||||
===================================================================
|
||||
--- mozilla-release.orig/js/src/gc/Heap.h
|
||||
+++ mozilla-release/js/src/gc/Heap.h
|
||||
@@ -800,7 +800,7 @@ struct Chunk
|
||||
|
||||
/* Search for a decommitted arena to allocate. */
|
||||
unsigned findDecommittedArenaOffset();
|
||||
- ArenaHeader* fetchNextDecommittedArena();
|
||||
+ ArenaHeader* fetchNextDecommittedArena(JSRuntime *rt);
|
||||
|
||||
public:
|
||||
/* Unlink and return the freeArenasHead. */
|
||||
Index: mozilla-release/js/src/gc/Memory.cpp
|
||||
===================================================================
|
||||
--- mozilla-release.orig/js/src/gc/Memory.cpp
|
||||
+++ mozilla-release/js/src/gc/Memory.cpp
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "mozilla/Assertions.h"
|
||||
|
||||
#include "jstypes.h"
|
||||
+#include "jscntxt.h"
|
||||
|
||||
#include "js/Utility.h"
|
||||
#include "gc/Memory.h"
|
||||
@@ -19,39 +20,34 @@ namespace gc {
|
||||
extern const size_t PageSize;
|
||||
extern const size_t ArenaSize;
|
||||
static bool
|
||||
-DecommitEnabled()
|
||||
+DecommitEnabled(JSRuntime *rt)
|
||||
{
|
||||
- return PageSize == ArenaSize;
|
||||
+ return rt->gcSystemPageSize == ArenaSize;
|
||||
}
|
||||
|
||||
#if defined(XP_WIN)
|
||||
#include "jswin.h"
|
||||
#include <psapi.h>
|
||||
|
||||
-static size_t AllocationGranularity = 0;
|
||||
-
|
||||
void
|
||||
-InitMemorySubsystem()
|
||||
+InitMemorySubsystem(JSRuntime *rt)
|
||||
{
|
||||
SYSTEM_INFO sysinfo;
|
||||
GetSystemInfo(&sysinfo);
|
||||
- if (sysinfo.dwPageSize != PageSize) {
|
||||
- fprintf(stderr,"SpiderMonkey compiled with incorrect page size; please update js/public/HeapAPI.h.\n");
|
||||
- MOZ_CRASH();
|
||||
- }
|
||||
- AllocationGranularity = sysinfo.dwAllocationGranularity;
|
||||
+ rt->gcSystemPageSize = sysinfo.dwPageSize;
|
||||
+ rt->gcSystemAllocGranularity = sysinfo.dwAllocationGranularity;
|
||||
}
|
||||
|
||||
void *
|
||||
-MapAlignedPages(size_t size, size_t alignment)
|
||||
+MapAlignedPages(JSRuntime *rt, size_t size, size_t alignment)
|
||||
{
|
||||
JS_ASSERT(size >= alignment);
|
||||
JS_ASSERT(size % alignment == 0);
|
||||
- JS_ASSERT(size % PageSize == 0);
|
||||
- JS_ASSERT(alignment % AllocationGranularity == 0);
|
||||
+ JS_ASSERT(size % rt->gcSystemPageSize == 0);
|
||||
+ JS_ASSERT(alignment % rt->gcSystemAllocGranularity == 0);
|
||||
|
||||
/* Special case: If we want allocation alignment, no further work is needed. */
|
||||
- if (alignment == AllocationGranularity) {
|
||||
+ if (alignment == rt->gcSystemAllocGranularity) {
|
||||
return VirtualAlloc(NULL, size, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE);
|
||||
}
|
||||
|
||||
@@ -75,7 +71,7 @@ MapAlignedPages(size_t size, size_t alig
|
||||
if (!p)
|
||||
return NULL;
|
||||
void *chunkStart = (void *)(uintptr_t(p) + (alignment - (uintptr_t(p) % alignment)));
|
||||
- UnmapPages(p, size * 2);
|
||||
+ UnmapPages(rt, p, size * 2);
|
||||
p = VirtualAlloc(chunkStart, size, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE);
|
||||
|
||||
/* Failure here indicates a race with another thread, so try again. */
|
||||
@@ -86,26 +82,26 @@ MapAlignedPages(size_t size, size_t alig
|
||||
}
|
||||
|
||||
void
|
||||
-UnmapPages(void *p, size_t size)
|
||||
+UnmapPages(JSRuntime *rt, void *p, size_t size)
|
||||
{
|
||||
JS_ALWAYS_TRUE(VirtualFree(p, 0, MEM_RELEASE));
|
||||
}
|
||||
|
||||
bool
|
||||
-MarkPagesUnused(void *p, size_t size)
|
||||
+MarkPagesUnused(JSRuntime *rt, void *p, size_t size)
|
||||
{
|
||||
- if (!DecommitEnabled())
|
||||
- return false;
|
||||
+ if (!DecommitEnabled(rt))
|
||||
+ return true;
|
||||
|
||||
- JS_ASSERT(uintptr_t(p) % PageSize == 0);
|
||||
+ JS_ASSERT(uintptr_t(p) % rt->gcSystemPageSize == 0);
|
||||
LPVOID p2 = VirtualAlloc(p, size, MEM_RESET, PAGE_READWRITE);
|
||||
return p2 == p;
|
||||
}
|
||||
|
||||
bool
|
||||
-MarkPagesInUse(void *p, size_t size)
|
||||
+MarkPagesInUse(JSRuntime *rt, void *p, size_t size)
|
||||
{
|
||||
- JS_ASSERT(uintptr_t(p) % PageSize == 0);
|
||||
+ JS_ASSERT(uintptr_t(p) % rt->gcSystemPageSize == 0);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -127,12 +123,13 @@ GetPageFaultCount()
|
||||
#define OS2_MAX_RECURSIONS 16
|
||||
|
||||
void
|
||||
-InitMemorySubsystem()
|
||||
+InitMemorySubsystem(JSRuntime *rt)
|
||||
{
|
||||
+ rt->gcSystemPageSize = rt->gcSystemAllocGranularity = ArenaSize;
|
||||
}
|
||||
|
||||
void
|
||||
-UnmapPages(void *addr, size_t size)
|
||||
+UnmapPages(JSRuntime *rt, void *addr, size_t size)
|
||||
{
|
||||
if (!DosFreeMem(addr))
|
||||
return;
|
||||
@@ -153,7 +150,7 @@ UnmapPages(void *addr, size_t size)
|
||||
}
|
||||
|
||||
static void *
|
||||
-MapAlignedPagesRecursively(size_t size, size_t alignment, int& recursions)
|
||||
+MapAlignedPagesRecursively(JSRuntime *rt, size_t size, size_t alignment, int& recursions)
|
||||
{
|
||||
if (++recursions >= OS2_MAX_RECURSIONS)
|
||||
return NULL;
|
||||
@@ -179,7 +176,7 @@ MapAlignedPagesRecursively(size_t size,
|
||||
unsigned long rc = DosQueryMem(&(static_cast<char*>(tmp))[size],
|
||||
&cb, &flags);
|
||||
if (!rc && (flags & PAG_FREE) && cb >= filler) {
|
||||
- UnmapPages(tmp, 0);
|
||||
+ UnmapPages(rt, tmp, 0);
|
||||
if (DosAllocMem(&tmp, filler,
|
||||
OBJ_ANY | PAG_COMMIT | PAG_READ | PAG_WRITE)) {
|
||||
JS_ALWAYS_TRUE(DosAllocMem(&tmp, filler,
|
||||
@@ -187,19 +184,19 @@ MapAlignedPagesRecursively(size_t size,
|
||||
}
|
||||
}
|
||||
|
||||
- void *p = MapAlignedPagesRecursively(size, alignment, recursions);
|
||||
- UnmapPages(tmp, 0);
|
||||
+ void *p = MapAlignedPagesRecursively(rt, size, alignment, recursions);
|
||||
+ UnmapPages(rt, tmp, 0);
|
||||
|
||||
return p;
|
||||
}
|
||||
|
||||
void *
|
||||
-MapAlignedPages(size_t size, size_t alignment)
|
||||
+MapAlignedPages(JSRuntime *rt, size_t size, size_t alignment)
|
||||
{
|
||||
JS_ASSERT(size >= alignment);
|
||||
JS_ASSERT(size % alignment == 0);
|
||||
- JS_ASSERT(size % PageSize == 0);
|
||||
- JS_ASSERT(alignment % PageSize == 0);
|
||||
+ JS_ASSERT(size % rt->gcSystemPageSize == 0);
|
||||
+ JS_ASSERT(alignment % rt->gcSystemAllocGranularity == 0);
|
||||
|
||||
int recursions = -1;
|
||||
|
||||
@@ -208,7 +205,7 @@ MapAlignedPages(size_t size, size_t alig
|
||||
* of the right size by recursively allocating blocks of unaligned
|
||||
* free memory until only an aligned allocation is possible.
|
||||
*/
|
||||
- void *p = MapAlignedPagesRecursively(size, alignment, recursions);
|
||||
+ void *p = MapAlignedPagesRecursively(rt, size, alignment, recursions);
|
||||
if (p)
|
||||
return p;
|
||||
|
||||
@@ -230,16 +227,15 @@ MapAlignedPages(size_t size, size_t alig
|
||||
}
|
||||
|
||||
bool
|
||||
-MarkPagesUnused(void *p, size_t size)
|
||||
-{
|
||||
- JS_ASSERT(uintptr_t(p) % PageSize == 0);
|
||||
+MarkPagesUnused(JSRuntime *rt, void *p, size_t size) {
|
||||
+ JS_ASSERT(uintptr_t(p) % rt->gcSystemPageSize == 0);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
-MarkPagesInUse(void *p, size_t size)
|
||||
+MarkPagesInUse(JSRuntime *rt, void *p, size_t size)
|
||||
{
|
||||
- JS_ASSERT(uintptr_t(p) % PageSize == 0);
|
||||
+ JS_ASSERT(uintptr_t(p) % rt->gcSystemPageSize == 0);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -259,17 +255,18 @@ GetPageFaultCount()
|
||||
#endif
|
||||
|
||||
void
|
||||
-InitMemorySubsystem()
|
||||
+InitMemorySubsystem(JSRuntime *rt)
|
||||
{
|
||||
+ rt->gcSystemPageSize = rt->gcSystemAllocGranularity = size_t(sysconf(_SC_PAGESIZE));
|
||||
}
|
||||
|
||||
void *
|
||||
-MapAlignedPages(size_t size, size_t alignment)
|
||||
+MapAlignedPages(JSRuntime *rt, size_t size, size_t alignment)
|
||||
{
|
||||
JS_ASSERT(size >= alignment);
|
||||
JS_ASSERT(size % alignment == 0);
|
||||
- JS_ASSERT(size % PageSize == 0);
|
||||
- JS_ASSERT(alignment % PageSize == 0);
|
||||
+ JS_ASSERT(size % rt->gcSystemPageSize == 0);
|
||||
+ JS_ASSERT(alignment % rt->gcSystemAllocGranularity == 0);
|
||||
|
||||
int prot = PROT_READ | PROT_WRITE;
|
||||
int flags = MAP_PRIVATE | MAP_ANON | MAP_ALIGN | MAP_NOSYNC;
|
||||
@@ -281,22 +278,22 @@ MapAlignedPages(size_t size, size_t alig
|
||||
}
|
||||
|
||||
void
|
||||
-UnmapPages(void *p, size_t size)
|
||||
+UnmapPages(JSRuntime *rt, void *p, size_t size)
|
||||
{
|
||||
JS_ALWAYS_TRUE(0 == munmap((caddr_t)p, size));
|
||||
}
|
||||
|
||||
bool
|
||||
-MarkPagesUnused(void *p, size_t size)
|
||||
+MarkPagesUnused(JSRuntime *rt, void *p, size_t size)
|
||||
{
|
||||
- JS_ASSERT(uintptr_t(p) % PageSize == 0);
|
||||
+ JS_ASSERT(uintptr_t(p) % rt->gcSystemPageSize == 0);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
-MarkPagesInUse(void *p, size_t size)
|
||||
+MarkPagesInUse(JSRuntime *rt, void *p, size_t size)
|
||||
{
|
||||
- JS_ASSERT(uintptr_t(p) % PageSize == 0);
|
||||
+ JS_ASSERT(uintptr_t(p) % rt->gcSystemPageSize == 0);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -314,27 +311,24 @@ GetPageFaultCount()
|
||||
#include <unistd.h>
|
||||
|
||||
void
|
||||
-InitMemorySubsystem()
|
||||
+InitMemorySubsystem(JSRuntime *rt)
|
||||
{
|
||||
- if (size_t(sysconf(_SC_PAGESIZE)) != PageSize) {
|
||||
- fprintf(stderr,"SpiderMonkey compiled with incorrect page size; please update js/public/HeapAPI.h.\n");
|
||||
- MOZ_CRASH();
|
||||
- }
|
||||
+ rt->gcSystemPageSize = rt->gcSystemAllocGranularity = size_t(sysconf(_SC_PAGESIZE));
|
||||
}
|
||||
|
||||
void *
|
||||
-MapAlignedPages(size_t size, size_t alignment)
|
||||
+MapAlignedPages(JSRuntime *rt, size_t size, size_t alignment)
|
||||
{
|
||||
JS_ASSERT(size >= alignment);
|
||||
JS_ASSERT(size % alignment == 0);
|
||||
- JS_ASSERT(size % PageSize == 0);
|
||||
- JS_ASSERT(alignment % PageSize == 0);
|
||||
+ JS_ASSERT(size % rt->gcSystemPageSize == 0);
|
||||
+ JS_ASSERT(alignment % rt->gcSystemAllocGranularity == 0);
|
||||
|
||||
int prot = PROT_READ | PROT_WRITE;
|
||||
int flags = MAP_PRIVATE | MAP_ANON;
|
||||
|
||||
/* Special case: If we want page alignment, no further work is needed. */
|
||||
- if (alignment == PageSize) {
|
||||
+ if (alignment == rt->gcSystemAllocGranularity) {
|
||||
return mmap(NULL, size, prot, flags, -1, 0);
|
||||
}
|
||||
|
||||
@@ -360,26 +354,26 @@ MapAlignedPages(size_t size, size_t alig
|
||||
}
|
||||
|
||||
void
|
||||
-UnmapPages(void *p, size_t size)
|
||||
+UnmapPages(JSRuntime *rt, void *p, size_t size)
|
||||
{
|
||||
JS_ALWAYS_TRUE(0 == munmap(p, size));
|
||||
}
|
||||
|
||||
bool
|
||||
-MarkPagesUnused(void *p, size_t size)
|
||||
+MarkPagesUnused(JSRuntime *rt, void *p, size_t size)
|
||||
{
|
||||
- if (!DecommitEnabled())
|
||||
- return false;
|
||||
+ if (!DecommitEnabled(rt))
|
||||
+ return true;
|
||||
|
||||
- JS_ASSERT(uintptr_t(p) % PageSize == 0);
|
||||
+ JS_ASSERT(uintptr_t(p) % rt->gcSystemPageSize == 0);
|
||||
int result = madvise(p, size, MADV_DONTNEED);
|
||||
return result != -1;
|
||||
}
|
||||
|
||||
bool
|
||||
-MarkPagesInUse(void *p, size_t size)
|
||||
+MarkPagesInUse(JSRuntime *rt, void *p, size_t size)
|
||||
{
|
||||
- JS_ASSERT(uintptr_t(p) % PageSize == 0);
|
||||
+ JS_ASSERT(uintptr_t(p) % rt->gcSystemPageSize == 0);
|
||||
return true;
|
||||
}
|
||||
|
||||
Index: mozilla-release/js/src/gc/Memory.h
|
||||
===================================================================
|
||||
--- mozilla-release.orig/js/src/gc/Memory.h
|
||||
+++ mozilla-release/js/src/gc/Memory.h
|
||||
@@ -16,20 +16,20 @@ namespace gc {
|
||||
|
||||
// Sanity check that our compiled configuration matches the currently running
|
||||
// instance and initialize any runtime data needed for allocation.
|
||||
-void InitMemorySubsystem();
|
||||
+void InitMemorySubsystem(JSRuntime *rt);
|
||||
|
||||
// Allocate or deallocate pages from the system with the given alignment.
|
||||
-void *MapAlignedPages(size_t size, size_t alignment);
|
||||
-void UnmapPages(void *p, size_t size);
|
||||
+void *MapAlignedPages(JSRuntime *rt, size_t size, size_t alignment);
|
||||
+void UnmapPages(JSRuntime *rt, void *p, size_t size);
|
||||
|
||||
// Tell the OS that the given pages are not in use, so they should not
|
||||
// be written to a paging file. This may be a no-op on some platforms.
|
||||
-bool MarkPagesUnused(void *p, size_t size);
|
||||
+bool MarkPagesUnused(JSRuntime *rt, void *p, size_t size);
|
||||
|
||||
// Undo |MarkPagesUnused|: tell the OS that the given pages are of interest
|
||||
// and should be paged in and out normally. This may be a no-op on some
|
||||
// platforms.
|
||||
-bool MarkPagesInUse(void *p, size_t size);
|
||||
+bool MarkPagesInUse(JSRuntime *rt, void *p, size_t size);
|
||||
|
||||
// Returns #(hard faults) + #(soft faults)
|
||||
size_t GetPageFaultCount();
|
||||
Index: mozilla-release/js/src/jsapi.cpp
|
||||
===================================================================
|
||||
--- mozilla-release.orig/js/src/jsapi.cpp
|
||||
+++ mozilla-release/js/src/jsapi.cpp
|
||||
@@ -1105,8 +1105,6 @@ JS_NewRuntime(uint32_t maxbytes, JSUseHe
|
||||
#undef MSG_DEF
|
||||
#endif /* DEBUG */
|
||||
|
||||
- InitMemorySubsystem();
|
||||
-
|
||||
if (!js::TlsPerThreadData.init())
|
||||
return NULL;
|
||||
|
||||
Index: mozilla-release/js/src/jscntxt.h
|
||||
===================================================================
|
||||
--- mozilla-release.orig/js/src/jscntxt.h
|
||||
+++ mozilla-release/js/src/jscntxt.h
|
||||
@@ -847,6 +847,15 @@ struct JSRuntime : js::RuntimeFriendFiel
|
||||
/* Stack of thread-stack-allocated GC roots. */
|
||||
js::AutoGCRooter *autoGCRooters;
|
||||
|
||||
+ /*
|
||||
+ * The GC can only safely decommit memory when the page size of the
|
||||
+ * running process matches the compiled arena size.
|
||||
+ */
|
||||
+ size_t gcSystemPageSize;
|
||||
+
|
||||
+ /* The OS allocation granularity may not match the page size. */
|
||||
+ size_t gcSystemAllocGranularity;
|
||||
+
|
||||
/* Strong references on scripts held for PCCount profiling API. */
|
||||
js::ScriptAndCountsVector *scriptAndCountsVector;
|
||||
|
||||
Index: mozilla-release/js/src/jsgc.cpp
|
||||
===================================================================
|
||||
--- mozilla-release.orig/js/src/jsgc.cpp
|
||||
+++ mozilla-release/js/src/jsgc.cpp
|
||||
@@ -486,13 +486,13 @@ FinalizeArenas(FreeOp *fop,
|
||||
}
|
||||
|
||||
static inline Chunk *
|
||||
-AllocChunk() {
|
||||
- return static_cast<Chunk *>(MapAlignedPages(ChunkSize, ChunkSize));
|
||||
+AllocChunk(JSRuntime *rt) {
|
||||
+ return static_cast<Chunk *>(MapAlignedPages(rt, ChunkSize, ChunkSize));
|
||||
}
|
||||
|
||||
static inline void
|
||||
-FreeChunk(Chunk *p) {
|
||||
- UnmapPages(static_cast<void *>(p), ChunkSize);
|
||||
+FreeChunk(JSRuntime *rt, Chunk *p) {
|
||||
+ UnmapPages(rt, static_cast<void *>(p), ChunkSize);
|
||||
}
|
||||
|
||||
inline bool
|
||||
@@ -582,25 +582,25 @@ ChunkPool::expire(JSRuntime *rt, bool re
|
||||
}
|
||||
|
||||
static void
|
||||
-FreeChunkList(Chunk *chunkListHead)
|
||||
+FreeChunkList(JSRuntime *rt, Chunk *chunkListHead)
|
||||
{
|
||||
while (Chunk *chunk = chunkListHead) {
|
||||
JS_ASSERT(!chunk->info.numArenasFreeCommitted);
|
||||
chunkListHead = chunk->info.next;
|
||||
- FreeChunk(chunk);
|
||||
+ FreeChunk(rt, chunk);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
ChunkPool::expireAndFree(JSRuntime *rt, bool releaseAll)
|
||||
{
|
||||
- FreeChunkList(expire(rt, releaseAll));
|
||||
+ FreeChunkList(rt, expire(rt, releaseAll));
|
||||
}
|
||||
|
||||
/* static */ Chunk *
|
||||
Chunk::allocate(JSRuntime *rt)
|
||||
{
|
||||
- Chunk *chunk = static_cast<Chunk *>(AllocChunk());
|
||||
+ Chunk *chunk = static_cast<Chunk *>(AllocChunk(rt));
|
||||
|
||||
#ifdef JSGC_ROOT_ANALYSIS
|
||||
// Our poison pointers are not guaranteed to be invalid on 64-bit
|
||||
@@ -613,7 +613,7 @@ Chunk::allocate(JSRuntime *rt)
|
||||
// were marked as uncommitted, but it's a little complicated to avoid
|
||||
// clobbering pre-existing unrelated mappings.
|
||||
while (IsPoisonedPtr(chunk))
|
||||
- chunk = static_cast<Chunk *>(AllocChunk());
|
||||
+ chunk = static_cast<Chunk *>(AllocChunk(rt));
|
||||
#endif
|
||||
|
||||
if (!chunk)
|
||||
@@ -629,7 +629,7 @@ Chunk::release(JSRuntime *rt, Chunk *chu
|
||||
{
|
||||
JS_ASSERT(chunk);
|
||||
chunk->prepareToBeFreed(rt);
|
||||
- FreeChunk(chunk);
|
||||
+ FreeChunk(rt, chunk);
|
||||
}
|
||||
|
||||
inline void
|
||||
@@ -745,7 +745,7 @@ Chunk::findDecommittedArenaOffset()
|
||||
}
|
||||
|
||||
ArenaHeader *
|
||||
-Chunk::fetchNextDecommittedArena()
|
||||
+Chunk::fetchNextDecommittedArena(JSRuntime *rt)
|
||||
{
|
||||
JS_ASSERT(info.numArenasFreeCommitted == 0);
|
||||
JS_ASSERT(info.numArenasFree > 0);
|
||||
@@ -756,7 +756,7 @@ Chunk::fetchNextDecommittedArena()
|
||||
decommittedArenas.unset(offset);
|
||||
|
||||
Arena *arena = &arenas[offset];
|
||||
- MarkPagesInUse(arena, ArenaSize);
|
||||
+ MarkPagesInUse(rt, arena, ArenaSize);
|
||||
arena->aheader.setAsNotAllocated();
|
||||
|
||||
return &arena->aheader;
|
||||
@@ -790,7 +790,7 @@ Chunk::allocateArena(JSCompartment *comp
|
||||
|
||||
ArenaHeader *aheader = JS_LIKELY(info.numArenasFreeCommitted > 0)
|
||||
? fetchNextFreeArena(rt)
|
||||
- : fetchNextDecommittedArena();
|
||||
+ : fetchNextDecommittedArena(rt);
|
||||
aheader->init(comp, thingKind);
|
||||
if (JS_UNLIKELY(!hasAvailableArenas()))
|
||||
removeFromAvailableList();
|
||||
@@ -893,6 +893,8 @@ static const int64_t JIT_SCRIPT_RELEASE_
|
||||
JSBool
|
||||
js_InitGC(JSRuntime *rt, uint32_t maxbytes)
|
||||
{
|
||||
+ InitMemorySubsystem(rt);
|
||||
+
|
||||
if (!rt->gcChunkSet.init(INITIAL_CHUNK_CAPACITY))
|
||||
return false;
|
||||
|
||||
@@ -2745,7 +2747,7 @@ DecommitArenasFromAvailableList(JSRuntim
|
||||
Maybe<AutoUnlockGC> maybeUnlock;
|
||||
if (!rt->isHeapBusy())
|
||||
maybeUnlock.construct(rt);
|
||||
- ok = MarkPagesUnused(aheader->getArena(), ArenaSize);
|
||||
+ ok = MarkPagesUnused(rt, aheader->getArena(), ArenaSize);
|
||||
}
|
||||
|
||||
if (ok) {
|
||||
@@ -2813,7 +2815,7 @@ ExpireChunksAndArenas(JSRuntime *rt, boo
|
||||
{
|
||||
if (Chunk *toFree = rt->gcChunkPool.expire(rt, shouldShrink)) {
|
||||
AutoUnlockGC unlock(rt);
|
||||
- FreeChunkList(toFree);
|
||||
+ FreeChunkList(rt, toFree);
|
||||
}
|
||||
|
||||
if (shouldShrink)
|
||||
Index: mozilla-release/js/public/HeapAPI.h
|
||||
===================================================================
|
||||
--- mozilla-release.orig/js/public/HeapAPI.h
|
||||
+++ mozilla-release/js/public/HeapAPI.h
|
||||
@@ -11,24 +11,7 @@
|
||||
namespace js {
|
||||
namespace gc {
|
||||
|
||||
-/*
|
||||
- * Page size must be static to support our arena pointer optimizations, so we
|
||||
- * are forced to support each platform with non-4096 pages as a special case.
|
||||
- * Note: The freelist supports a maximum arena shift of 15.
|
||||
- * Note: Do not use JS_CPU_SPARC here, this header is used outside JS.
|
||||
- */
|
||||
-#if (defined(SOLARIS) || defined(__FreeBSD__)) && \
|
||||
- (defined(__sparc) || defined(__sparcv9) || defined(__ia64))
|
||||
-const size_t PageShift = 13;
|
||||
-const size_t ArenaShift = PageShift;
|
||||
-#elif defined(__powerpc64__)
|
||||
-const size_t PageShift = 16;
|
||||
const size_t ArenaShift = 12;
|
||||
-#else
|
||||
-const size_t PageShift = 12;
|
||||
-const size_t ArenaShift = PageShift;
|
||||
-#endif
|
||||
-const size_t PageSize = size_t(1) << PageShift;
|
||||
const size_t ArenaSize = size_t(1) << ArenaShift;
|
||||
const size_t ArenaMask = ArenaSize - 1;
|
||||
|
||||
1
sources
1
sources
|
|
@ -1 +0,0 @@
|
|||
de09d603c3b768a1698d90141f3b2644 firefox-19.0.2.source.tar.bz2
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
diff -up xulrunner-15.0/mozilla-beta/toolkit/crashreporter/client/Makefile.in.gcc47 xulrunner-15.0/mozilla-beta/toolkit/crashreporter/client/Makefile.in
|
||||
--- xulrunner-15.0/mozilla-beta/toolkit/crashreporter/client/Makefile.in.gcc47 2012-08-15 07:48:31.000000000 +0200
|
||||
+++ xulrunner-15.0/mozilla-beta/toolkit/crashreporter/client/Makefile.in 2012-08-20 15:05:41.782947739 +0200
|
||||
@@ -34,6 +34,9 @@ CPPSRCS = \
|
||||
crashreporter.cpp \
|
||||
$(NULL)
|
||||
|
||||
+# Needed for moz_free
|
||||
+LIBS += -L$(LIBXUL_DIST)/lib -lmozalloc
|
||||
+
|
||||
ifeq ($(OS_ARCH),WINNT)
|
||||
CPPSRCS += crashreporter_win.cpp
|
||||
LIBS += \
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
Index: xulrunner-11.0/mozilla-release/memory/jemalloc/jemalloc.c
|
||||
===================================================================
|
||||
--- xulrunner-11.0.orig/mozilla-release/memory/mozjemalloc/jemalloc.c
|
||||
+++ xulrunner-11.0/mozilla-release/memory/mozjemalloc/jemalloc.c
|
||||
@@ -1089,7 +1089,9 @@ static unsigned ncpus;
|
||||
* controlling the malloc behavior are defined as compile-time constants
|
||||
* for best performance and cannot be altered at runtime.
|
||||
*/
|
||||
+#if !(defined(__powerpc__))
|
||||
#define MALLOC_STATIC_SIZES 1
|
||||
+#endif
|
||||
|
||||
#ifdef MALLOC_STATIC_SIZES
|
||||
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
diff -up xulrunner-17.0/mozilla-release/gfx/ycbcr/chromium_types.h.chromium-types xulrunner-17.0/mozilla-release/gfx/ycbcr/chromium_types.h
|
||||
--- xulrunner-17.0/mozilla-release/gfx/ycbcr/chromium_types.h.chromium-types 2012-11-16 20:56:29.000000000 +0100
|
||||
+++ xulrunner-17.0/mozilla-release/gfx/ycbcr/chromium_types.h 2012-11-20 09:19:14.843448418 +0100
|
||||
@@ -30,7 +30,11 @@ typedef int16_t int16;
|
||||
#define ARCH_CPU_ARM_FAMILY 1
|
||||
#define ARCH_CPU_ARMEL 1
|
||||
#define ARCH_CPU_32_BITS 1
|
||||
-#elif defined(__ppc__) || defined(__powerpc) || defined(__PPC__)
|
||||
+#elif defined(__powerpc64__)
|
||||
+#define ARCH_CPU_PPC_FAMILY 1
|
||||
+#define ARCH_CPU_PPC 1
|
||||
+#define ARCH_CPU_64_BITS 1
|
||||
+#elif defined(__ppc__) || defined(__powerpc__) || defined(__PPC__)
|
||||
#define ARCH_CPU_PPC_FAMILY 1
|
||||
#define ARCH_CPU_PPC 1
|
||||
#define ARCH_CPU_32_BITS 1
|
||||
@@ -42,6 +46,14 @@ typedef int16_t int16;
|
||||
#define ARCH_CPU_SPARC_FAMILY 1
|
||||
#define ARCH_CPU_SPARC 1
|
||||
#define ARCH_CPU_64_BITS 1
|
||||
+#elif defined(__s390x__)
|
||||
+#define ARCH_CPU_S390_FAMILY 1
|
||||
+#define ARCH_CPU_S390 1
|
||||
+#define ARCH_CPU_64_BITS 1
|
||||
+#elif defined(__s390__)
|
||||
+#define ARCH_CPU_S390_FAMILY 1
|
||||
+#define ARCH_CPU_S390 1
|
||||
+#define ARCH_CPU_32_BITS 1
|
||||
#else
|
||||
#warning Please add support for your architecture in chromium_types.h
|
||||
#endif
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
diff -up mozilla-aurora-7676a9a06403/config/baseconfig.mk.dir mozilla-aurora-7676a9a06403/config/baseconfig.mk
|
||||
--- mozilla-aurora-7676a9a06403/config/baseconfig.mk.dir 2012-09-13 14:18:35.000000000 +0200
|
||||
+++ mozilla-aurora-7676a9a06403/config/baseconfig.mk 2012-09-26 10:13:45.258240426 +0200
|
||||
@@ -2,7 +2,7 @@ INCLUDED_AUTOCONF_MK = 1
|
||||
|
||||
includedir := $(includedir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
|
||||
idldir = $(datadir)/idl/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
|
||||
-installdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
|
||||
+installdir = $(libdir)/$(MOZ_APP_NAME)
|
||||
sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel-$(MOZ_APP_VERSION)
|
||||
DIST = $(DEPTH)/dist
|
||||
|
||||
diff -up mozilla-aurora-7676a9a06403/js/src/config/baseconfig.mk.dir mozilla-aurora-7676a9a06403/js/src/config/baseconfig.mk
|
||||
--- mozilla-aurora-7676a9a06403/js/src/config/baseconfig.mk.dir 2012-09-13 14:18:35.000000000 +0200
|
||||
+++ mozilla-aurora-7676a9a06403/js/src/config/baseconfig.mk 2012-09-26 10:14:07.353351833 +0200
|
||||
@@ -1,6 +1,6 @@
|
||||
INCLUDED_AUTOCONF_MK = 1
|
||||
|
||||
-installdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
|
||||
+installdir = $(libdir)/$(MOZ_APP_NAME)
|
||||
sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel-$(MOZ_APP_VERSION)
|
||||
|
||||
ifneq (,$(filter /%,$(TOP_DIST)))
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
. $topsrcdir/xulrunner/config/mozconfig
|
||||
# --with-system-png is disabled because Mozilla requires APNG support in libpng
|
||||
#ac_add_options --with-system-png
|
||||
|
||||
ac_add_options --prefix="$PREFIX"
|
||||
ac_add_options --libdir="$LIBDIR"
|
||||
ac_add_options --with-system-jpeg
|
||||
ac_add_options --with-system-zlib
|
||||
ac_add_options --with-system-bz2
|
||||
ac_add_options --with-system-libvpx
|
||||
ac_add_options --enable-system-hunspell
|
||||
ac_add_options --with-pthreads
|
||||
ac_add_options --disable-strip
|
||||
ac_add_options --disable-tests
|
||||
ac_add_options --disable-mochitest
|
||||
ac_add_options --disable-installer
|
||||
ac_add_options --enable-xinerama
|
||||
ac_add_options --enable-default-toolkit=cairo-gtk2
|
||||
ac_add_options --enable-pango
|
||||
ac_add_options --enable-svg
|
||||
ac_add_options --enable-canvas
|
||||
ac_add_options --disable-javaxpcom
|
||||
ac_add_options --disable-crashreporter
|
||||
ac_add_options --enable-safe-browsing
|
||||
ac_add_options --enable-extensions=default
|
||||
ac_add_options --enable-libnotify
|
||||
ac_add_options --disable-necko-wifi
|
||||
ac_add_options --enable-startup-notification
|
||||
ac_add_options --disable-cpp-exceptions
|
||||
ac_add_options --enable-shared-js
|
||||
ac_add_options --enable-url-classifier
|
||||
ac_add_options --enable-gio
|
||||
ac_add_options --disable-gnomevfs
|
||||
ac_add_options --disable-updater
|
||||
ac_add_options --enable-chrome-format=omni
|
||||
|
||||
export BUILD_OFFICIAL=1
|
||||
export MOZILLA_OFFICIAL=1
|
||||
export MOZ_UA_BUILDID=20100101
|
||||
|
||||
mk_add_options BUILD_OFFICIAL=1
|
||||
mk_add_options MOZILLA_OFFICIAL=1
|
||||
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/objdir
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
# For mozilla's debuginfo:
|
||||
export CFLAGS="$CFLAGS -gdwarf-2"
|
||||
export CXXFLAGS="$CXXFLAGS -gdwarf-2"
|
||||
export MOZ_DEBUG_SYMBOLS=1
|
||||
ac_add_options --enable-crashreporter
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
pref("app.update.enabled", false);
|
||||
pref("app.update.autoInstallEnabled", false);
|
||||
pref("general.smoothScroll", true);
|
||||
pref("intl.locale.matchOS", true);
|
||||
pref("network.manage-offline-status", true);
|
||||
pref("toolkit.storage.synchronous", 0);
|
||||
pref("toolkit.networkmanager.disable", false);
|
||||
pref("offline.autoDetect", true);
|
||||
|
|
@ -1,69 +0,0 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
|
||||
##
|
||||
## Usage:
|
||||
##
|
||||
## $ xulrunner
|
||||
##
|
||||
## This script is meant to run a xulrunner program from the xulrunner
|
||||
## rpm installation.
|
||||
##
|
||||
|
||||
cmdname=`basename $0`
|
||||
|
||||
##
|
||||
## Variables
|
||||
##
|
||||
XUL_ARCH=$(uname -m)
|
||||
case $XUL_ARCH in
|
||||
x86_64 | ia64 | s390 )
|
||||
XUL_LIB_DIR="/usr/lib64"
|
||||
SECONDARY_LIB_DIR="/usr/lib"
|
||||
;;
|
||||
* )
|
||||
XUL_LIB_DIR="/usr/lib"
|
||||
SECONDARY_LIB_DIR="/usr/lib64"
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ ! -x $XUL_LIB_DIR/xulrunner/xulrunner ]; then
|
||||
if [ ! -x $SECONDARY_LIB_DIR/xulrunner/xulrunner ]; then
|
||||
echo "Error: $XUL_LIB_DIR/xulrunner/xulrunner not found"
|
||||
if [ -d $SECONDARY_LIB_DIR ]; then
|
||||
echo " $SECONDARY_LIB_DIR/xulrunner/xulrunner not found"
|
||||
fi
|
||||
exit 1
|
||||
fi
|
||||
XUL_LIB_DIR="$SECONDARY_LIB_DIR"
|
||||
fi
|
||||
XUL_DIST_BIN="$XUL_LIB_DIR/xulrunner"
|
||||
XUL_PROGRAM="$XUL_DIST_BIN/xulrunner"
|
||||
|
||||
##
|
||||
## Enable WebGL
|
||||
##
|
||||
MOZ_GLX_IGNORE_BLACKLIST=1
|
||||
export MOZ_GLX_IGNORE_BLACKLIST
|
||||
|
||||
|
||||
exec $XUL_PROGRAM "$@"
|
||||
1331
xulrunner.spec
1331
xulrunner.spec
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue