mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset 40811b076d51
This commit is contained in:
parent
ac8ba115d1
commit
1d0820d47f
@ -381,6 +381,9 @@
|
||||
@BINPATH@/@PREF_DIR@/firefox.js
|
||||
@BINPATH@/@PREF_DIR@/firefox-branding.js
|
||||
@BINPATH@/@PREF_DIR@/channel-prefs.js
|
||||
@BINPATH@/greprefs/all.js
|
||||
@BINPATH@/greprefs/security-prefs.js
|
||||
@BINPATH@/greprefs/xpinstall.js
|
||||
@BINPATH@/defaults/autoconfig/platform.js
|
||||
@BINPATH@/defaults/autoconfig/prefcalls.js
|
||||
|
||||
|
@ -28,10 +28,6 @@ defaults/profile/search.rdf
|
||||
defaults/profile/US/
|
||||
extensions/{641d8d09-7dda-4850-8228-ac0ab65e2ac9}/install.rdf
|
||||
extensions/{641d8d09-7dda-4850-8228-ac0ab65e2ac9}/
|
||||
greprefs/all.js
|
||||
greprefs/security-prefs.js
|
||||
greprefs/xpinstall.js
|
||||
greprefs/
|
||||
searchplugins/dictionary.src
|
||||
searchplugins/dictionary.png
|
||||
searchplugins/amazondotcom.src
|
||||
|
@ -72,6 +72,8 @@ ifdef WINCE
|
||||
DEFINES += -DWINCE=1
|
||||
endif
|
||||
|
||||
PREF_JS_EXPORTS = $(srcdir)/init/all.js
|
||||
|
||||
EXTRA_DSO_LDOPTS = \
|
||||
$(LIBS_DIR) \
|
||||
$(MOZ_COMPONENT_LIBS) \
|
||||
@ -80,7 +82,7 @@ EXTRA_DSO_LDOPTS = \
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
GARBAGE += $(addprefix $(DIST)/bin/defaults/pref/, \
|
||||
mailnews.js editor.js \
|
||||
all.js mailnews.js editor.js \
|
||||
aix.js beos.js unix.js winpref.js os2prefs.js openvms.js photon.js)
|
||||
|
||||
# Optimizer bug with GCC 3.2.2 on OS/2
|
||||
|
@ -1,4 +0,0 @@
|
||||
#filter emptyLines spaces
|
||||
#include ../../../xpinstall/public/xpinstall.js
|
||||
#include ../../../netwerk/base/public/security-prefs.js
|
||||
#include init/all.js
|
@ -1,2 +0,0 @@
|
||||
toolkit.jar:
|
||||
* res/greprefs.js (greprefs.js.in)
|
@ -448,9 +448,24 @@ nsresult nsPrefService::WritePrefFile(nsIFile* aFile)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
static nsresult openPrefInputStream(nsIInputStream *aInStr) {
|
||||
PRUint32 fileSize;
|
||||
nsresult rv = aInStr->Available(&fileSize);
|
||||
static nsresult openPrefFile(nsIFile* aFile)
|
||||
{
|
||||
nsCOMPtr<nsIInputStream> inStr;
|
||||
|
||||
#if MOZ_TIMELINE
|
||||
{
|
||||
nsCAutoString str;
|
||||
aFile->GetNativePath(str);
|
||||
NS_TIMELINE_MARK_FUNCTION1("load pref file", str.get());
|
||||
}
|
||||
#endif
|
||||
|
||||
nsresult rv = NS_NewLocalFileInputStream(getter_AddRefs(inStr), aFile);
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
|
||||
PRInt64 fileSize;
|
||||
rv = aFile->GetFileSize(&fileSize);
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
|
||||
@ -466,7 +481,7 @@ static nsresult openPrefInputStream(nsIInputStream *aInStr) {
|
||||
nsresult rv2 = NS_OK;
|
||||
for (;;) {
|
||||
PRUint32 amtRead = 0;
|
||||
rv = aInStr->Read((char*)fileBuffer, fileSize, &amtRead);
|
||||
rv = inStr->Read((char*)fileBuffer, fileSize, &amtRead);
|
||||
if (NS_FAILED(rv) || amtRead == 0)
|
||||
break;
|
||||
if (!PREF_ParseBuf(&ps, fileBuffer, amtRead))
|
||||
@ -478,16 +493,6 @@ static nsresult openPrefInputStream(nsIInputStream *aInStr) {
|
||||
return NS_FAILED(rv) ? rv : rv2;
|
||||
}
|
||||
|
||||
static nsresult openPrefFile(nsIFile* aFile)
|
||||
{
|
||||
nsCOMPtr<nsIInputStream> inStr;
|
||||
|
||||
nsresult rv = NS_NewLocalFileInputStream(getter_AddRefs(inStr), aFile);
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
return openPrefInputStream(inStr);
|
||||
}
|
||||
|
||||
/*
|
||||
* some stuff that gets called from Pref_Init()
|
||||
*/
|
||||
@ -634,33 +639,24 @@ static nsresult pref_LoadPrefsInDirList(const char *listId)
|
||||
//----------------------------------------------------------------------------------------
|
||||
static nsresult pref_InitInitialObjects()
|
||||
{
|
||||
nsCOMPtr<nsIFile> aFile;
|
||||
nsCOMPtr<nsIFile> defaultPrefDir;
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsIIOService> ioservice(do_GetIOService(&rv));
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
|
||||
// first we parse the GRE default prefs. This also works if we're not using a GRE,
|
||||
nsCOMPtr<nsIURI> uri;
|
||||
rv = ioservice->NewURI(NS_LITERAL_CSTRING("resource://gre-resources/greprefs.js"), nsnull, nsnull,
|
||||
getter_AddRefs(uri));
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
nsCOMPtr<nsIChannel> channel;
|
||||
rv = NS_NewChannel(getter_AddRefs(channel), uri);
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
|
||||
nsCOMPtr<nsIInputStream> inStr;
|
||||
rv = channel->Open(getter_AddRefs(inStr));
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
rv = openPrefInputStream(inStr);
|
||||
if (NS_FAILED(rv)) {
|
||||
NS_WARNING("Error parsing GRE default preferences. Is this an old-style embedding app?");
|
||||
}
|
||||
rv = NS_GetSpecialDirectory(NS_GRE_DIR, getter_AddRefs(defaultPrefDir));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
rv = defaultPrefDir->AppendNative(NS_LITERAL_CSTRING("greprefs"));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
rv = pref_LoadPrefsInDir(defaultPrefDir, nsnull, 0);
|
||||
if (NS_FAILED(rv)) {
|
||||
NS_WARNING("Error parsing GRE default preferences. Is this an old-style embedding app?");
|
||||
}
|
||||
|
||||
// now parse the "application" default preferences
|
||||
nsCOMPtr<nsIFile> defaultPrefDir;
|
||||
rv = NS_GetSpecialDirectory(NS_APP_PREF_DEFAULTS_50_DIR, getter_AddRefs(defaultPrefDir));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
|
@ -146,6 +146,8 @@ EXPORTS = \
|
||||
nsASocketHandler.h \
|
||||
$(NULL)
|
||||
|
||||
PREF_JS_EXPORTS = $(srcdir)/security-prefs.js
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
DEFINES += -DIMPL_NS_NET
|
||||
|
@ -62,4 +62,6 @@ EXPORTS = \
|
||||
nsSoftwareUpdateIIDs.h \
|
||||
$(NULL)
|
||||
|
||||
PREF_JS_EXPORTS = $(srcdir)/xpinstall.js
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
Loading…
Reference in New Issue
Block a user