mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset 2fe4ca46eec8 (bug 947736) because of build bustage
Landed on a CLOSED TREE
This commit is contained in:
parent
2342de0db0
commit
38ace3caac
@ -26,7 +26,7 @@ class nsAdoptingString;
|
||||
class nsAdoptingCString;
|
||||
|
||||
#ifndef have_PrefChangedFunc_typedef
|
||||
typedef void (*PrefChangedFunc)(const char *, void *);
|
||||
typedef int (*PrefChangedFunc)(const char *, void *);
|
||||
#define have_PrefChangedFunc_typedef
|
||||
#endif
|
||||
|
||||
|
@ -1672,11 +1672,12 @@ Preferences::UnregisterCallback(PrefChangedFunc aCallback,
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
static void BoolVarChanged(const char* aPref, void* aClosure)
|
||||
static int BoolVarChanged(const char* aPref, void* aClosure)
|
||||
{
|
||||
CacheData* cache = static_cast<CacheData*>(aClosure);
|
||||
*((bool*)cache->cacheLocation) =
|
||||
Preferences::GetBool(aPref, cache->defaultValueBool);
|
||||
return 0;
|
||||
}
|
||||
|
||||
// static
|
||||
@ -1694,11 +1695,12 @@ Preferences::AddBoolVarCache(bool* aCache,
|
||||
return RegisterCallback(BoolVarChanged, aPref, data);
|
||||
}
|
||||
|
||||
static void IntVarChanged(const char* aPref, void* aClosure)
|
||||
static int IntVarChanged(const char* aPref, void* aClosure)
|
||||
{
|
||||
CacheData* cache = static_cast<CacheData*>(aClosure);
|
||||
*((int32_t*)cache->cacheLocation) =
|
||||
Preferences::GetInt(aPref, cache->defaultValueInt);
|
||||
return 0;
|
||||
}
|
||||
|
||||
// static
|
||||
@ -1716,11 +1718,12 @@ Preferences::AddIntVarCache(int32_t* aCache,
|
||||
return RegisterCallback(IntVarChanged, aPref, data);
|
||||
}
|
||||
|
||||
static void UintVarChanged(const char* aPref, void* aClosure)
|
||||
static int UintVarChanged(const char* aPref, void* aClosure)
|
||||
{
|
||||
CacheData* cache = static_cast<CacheData*>(aClosure);
|
||||
*((uint32_t*)cache->cacheLocation) =
|
||||
Preferences::GetUint(aPref, cache->defaultValueUint);
|
||||
return 0;
|
||||
}
|
||||
|
||||
// static
|
||||
@ -1738,11 +1741,12 @@ Preferences::AddUintVarCache(uint32_t* aCache,
|
||||
return RegisterCallback(UintVarChanged, aPref, data);
|
||||
}
|
||||
|
||||
static void FloatVarChanged(const char* aPref, void* aClosure)
|
||||
static int FloatVarChanged(const char* aPref, void* aClosure)
|
||||
{
|
||||
CacheData* cache = static_cast<CacheData*>(aClosure);
|
||||
*((float*)cache->cacheLocation) =
|
||||
Preferences::GetFloat(aPref, cache->defaultValueFloat);
|
||||
return 0;
|
||||
}
|
||||
|
||||
// static
|
||||
|
@ -4,18 +4,14 @@
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
UNIFIED_SOURCES += [
|
||||
SOURCES += [
|
||||
'nsPrefBranch.cpp',
|
||||
'nsPrefsFactory.cpp',
|
||||
'prefapi.cpp',
|
||||
'Preferences.cpp',
|
||||
'prefread.cpp',
|
||||
]
|
||||
|
||||
# prefapi.cpp cannot be built in unified mode because it uses plarena.h
|
||||
SOURCES += [
|
||||
'prefapi.cpp',
|
||||
]
|
||||
|
||||
MSVC_ENABLE_PGO = True
|
||||
|
||||
include('/ipc/chromium/chromium-config.mozbuild')
|
||||
|
@ -681,7 +681,7 @@ NS_IMETHODIMP nsPrefBranch::Observe(nsISupports *aSubject, const char *aTopic, c
|
||||
}
|
||||
|
||||
/* static */
|
||||
void nsPrefBranch::NotifyObserver(const char *newpref, void *data)
|
||||
nsresult nsPrefBranch::NotifyObserver(const char *newpref, void *data)
|
||||
{
|
||||
PrefCallback *pCallback = (PrefCallback *)data;
|
||||
|
||||
@ -689,7 +689,7 @@ void nsPrefBranch::NotifyObserver(const char *newpref, void *data)
|
||||
if (!observer) {
|
||||
// The observer has expired. Let's remove this callback.
|
||||
pCallback->GetPrefBranch()->RemoveExpiredCallback(pCallback);
|
||||
return;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// remove any root this string may contain so as to not confuse the observer
|
||||
@ -700,6 +700,7 @@ void nsPrefBranch::NotifyObserver(const char *newpref, void *data)
|
||||
observer->Observe(static_cast<nsIPrefBranch *>(pCallback->GetPrefBranch()),
|
||||
NS_PREFBRANCH_PREFCHANGE_TOPIC_ID,
|
||||
NS_ConvertASCIItoUTF16(suffix).get());
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
PLDHashOperator
|
||||
|
@ -3,9 +3,6 @@
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#ifndef nsPrefBranch_h
|
||||
#define nsPrefBranch_h
|
||||
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIObserver.h"
|
||||
#include "nsIPrefBranch.h"
|
||||
@ -194,7 +191,7 @@ public:
|
||||
|
||||
nsresult RemoveObserverFromMap(const char *aDomain, nsISupports *aObserver);
|
||||
|
||||
static void NotifyObserver(const char *newpref, void *data);
|
||||
static nsresult NotifyObserver(const char *newpref, void *data);
|
||||
|
||||
size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf);
|
||||
|
||||
@ -263,5 +260,3 @@ private:
|
||||
nsCOMPtr<nsIFile> mFile;
|
||||
nsCString mRelativeToKey;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -953,7 +953,9 @@ static nsresult pref_DoCallback(const char* changed_pref)
|
||||
node->domain,
|
||||
strlen(node->domain)) == 0 )
|
||||
{
|
||||
(*node->func) (changed_pref, node->data);
|
||||
nsresult rv2 = (*node->func) (changed_pref, node->data);
|
||||
if (NS_FAILED(rv2))
|
||||
rv = rv2;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -154,7 +154,7 @@ nsresult PREF_ClearAllUserPrefs();
|
||||
** compilers were having problems with multiple definitions.
|
||||
*/
|
||||
#ifndef have_PrefChangedFunc_typedef
|
||||
typedef void (*PrefChangedFunc) (const char *, void *);
|
||||
typedef nsresult (*PrefChangedFunc) (const char *, void *);
|
||||
#define have_PrefChangedFunc_typedef
|
||||
#endif
|
||||
|
||||
|
@ -5,9 +5,6 @@
|
||||
|
||||
/* Data shared between prefapi.c and nsPref.cpp */
|
||||
|
||||
#ifndef prefapi_private_data_h
|
||||
#define prefapi_private_data_h
|
||||
|
||||
#include "mozilla/MemoryReporting.h"
|
||||
|
||||
extern PLDHashTable gHashTable;
|
||||
@ -45,5 +42,3 @@ void pref_GetPrefFromEntry(PrefHashEntry *aHashEntry,
|
||||
|
||||
size_t
|
||||
pref_SizeOfPrivateData(mozilla::MallocSizeOf aMallocSizeOf);
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user