Browse Source

Issue #1359 - Pointlessly rename greprefs.. again.

pull/24/head
Matt A. Tobin 3 years ago committed by Roy Tam
parent
commit
2aca38b372
  1. 12
      modules/libpref/Preferences.cpp
  2. 0
      modules/libpref/goanna.js
  3. 4
      modules/libpref/moz.build
  4. 2
      python/mozbuild/mozpack/packager/formats.py
  5. 4
      python/mozbuild/mozpack/test/test_packager_formats.py
  6. 2
      toolkit/mozapps/update/tests/data/xpcshellUtilsAUS.js

12
modules/libpref/Preferences.cpp

@ -1229,10 +1229,10 @@ static nsresult pref_InitInitialObjects()
nsresult rv;
// In omni.jar case, we load the following prefs:
// - jar:$gre/omni.jar!/greprefs.js
// - jar:$gre/omni.jar!/goanna.js
// - jar:$gre/omni.jar!/defaults/pref/*.js
// In non omni.jar case, we load:
// - $gre/greprefs.js
// - $gre/goanna.js
//
// In both cases, we also load:
// - $gre/defaults/pref/*.js
@ -1259,8 +1259,8 @@ static nsresult pref_InitInitialObjects()
RefPtr<nsZipArchive> jarReader = mozilla::Omnijar::GetReader(mozilla::Omnijar::GRE);
if (jarReader) {
// Load jar:$gre/omni.jar!/greprefs.js
rv = pref_ReadPrefFromJar(jarReader, "greprefs.js");
// Load jar:$gre/omni.jar!/goanna.js
rv = pref_ReadPrefFromJar(jarReader, "goanna.js");
NS_ENSURE_SUCCESS(rv, rv);
// Load jar:$gre/omni.jar!/defaults/pref/*.js
@ -1279,12 +1279,12 @@ static nsresult pref_InitInitialObjects()
NS_WARNING("Error parsing preferences.");
}
} else {
// Load $gre/greprefs.js
// Load $gre/goanna.js
nsCOMPtr<nsIFile> greprefsFile;
rv = NS_GetSpecialDirectory(NS_GRE_DIR, getter_AddRefs(greprefsFile));
NS_ENSURE_SUCCESS(rv, rv);
rv = greprefsFile->AppendNative(NS_LITERAL_CSTRING("greprefs.js"));
rv = greprefsFile->AppendNative(NS_LITERAL_CSTRING("goanna.js"));
NS_ENSURE_SUCCESS(rv, rv);
rv = openPrefFile(greprefsFile);

0
modules/libpref/greprefs.js → modules/libpref/goanna.js

4
modules/libpref/moz.build

@ -43,6 +43,4 @@ FINAL_LIBRARY = 'xul'
DEFINES['OS_ARCH'] = CONFIG['OS_ARCH']
DEFINES['MOZ_WIDGET_TOOLKIT'] = CONFIG['MOZ_WIDGET_TOOLKIT']
FINAL_TARGET_PP_FILES += [
'greprefs.js',
]
FINAL_TARGET_PP_FILES += ['goanna.js']

2
python/mozbuild/mozpack/packager/formats.py

@ -318,7 +318,7 @@ class OmniJarSubFormatter(PiecemealFormatter):
path[1] in ['pref', 'preferences'])
return path[0] in [
'modules',
'greprefs.js',
'goanna.js',
'hyphenation',
'update.locale',
] or path[0] in STARTUP_CACHE_PATHS

4
python/mozbuild/mozpack/test/test_packager_formats.py

@ -405,13 +405,13 @@ class TestFormatters(unittest.TestCase):
self.assertFalse(
is_resource(base, 'defaults/preferences/channel-prefs.js'))
self.assertTrue(is_resource(base, 'modules/foo.jsm'))
self.assertTrue(is_resource(base, 'greprefs.js'))
self.assertTrue(is_resource(base, 'goanna.js'))
self.assertTrue(is_resource(base, 'hyphenation/foo'))
self.assertTrue(is_resource(base, 'update.locale'))
self.assertTrue(
is_resource(base, 'jsloader/resource/gre/modules/foo.jsm'))
self.assertFalse(is_resource(base, 'foo'))
self.assertFalse(is_resource(base, 'foo/bar/greprefs.js'))
self.assertFalse(is_resource(base, 'foo/bar/goanna.js'))
self.assertTrue(is_resource(base, 'defaults/messenger/foo.dat'))
self.assertFalse(
is_resource(base, 'defaults/messenger/mailViews.dat'))

2
toolkit/mozapps/update/tests/data/xpcshellUtilsAUS.js

@ -839,7 +839,7 @@ function setupTestCommon() {
if (!grePrefsFile.exists()) {
grePrefsFile.create(Ci.nsIFile.DIRECTORY_TYPE, PERMS_DIRECTORY);
}
grePrefsFile.append("greprefs.js");
grePrefsFile.append("goanna.js");
if (!grePrefsFile.exists()) {
grePrefsFile.create(Ci.nsILocalFile.NORMAL_FILE_TYPE, PERMS_FILE);
}

Loading…
Cancel
Save