mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 22:32:46 +00:00
Backed out changeset 75935042f60b (bug 1920080) for causing assertion failure on FetchUtil.cpp
This commit is contained in:
parent
9f119b8fc8
commit
68c83a72df
@ -655,7 +655,7 @@ class JSStreamConsumer final : public nsIInputStreamCallback,
|
||||
NS_IMPL_ISUPPORTS(JSStreamConsumer, nsIInputStreamCallback)
|
||||
|
||||
// static
|
||||
MOZ_CONSTINIT const nsCString FetchUtil::WasmAltDataType;
|
||||
MOZ_RUNINIT const nsCString FetchUtil::WasmAltDataType;
|
||||
|
||||
// static
|
||||
void FetchUtil::InitWasmAltDataType() {
|
||||
|
@ -86,7 +86,7 @@ void gfxAndroidPlatform::FontAPIInitializeCallback(void* aUnused) {
|
||||
}
|
||||
|
||||
PRThread* gfxAndroidPlatform::sFontAPIInitializeThread = nullptr;
|
||||
MOZ_CONSTINIT nsCString gfxAndroidPlatform::sManufacturer;
|
||||
MOZ_RUNINIT nsCString gfxAndroidPlatform::sManufacturer;
|
||||
|
||||
// static
|
||||
bool gfxAndroidPlatform::IsFontAPIDisabled(bool aDontCheckPref) {
|
||||
|
@ -29,7 +29,7 @@ namespace ipc {
|
||||
|
||||
ProcessChild* ProcessChild::gProcessChild;
|
||||
StaticMutex ProcessChild::gIPCShutdownStateLock;
|
||||
MOZ_CONSTINIT nsCString ProcessChild::gIPCShutdownStateAnnotation;
|
||||
MOZ_RUNINIT nsCString ProcessChild::gIPCShutdownStateAnnotation;
|
||||
|
||||
static Atomic<bool> sExpectingShutdown(false);
|
||||
|
||||
|
@ -2045,7 +2045,7 @@ static void TestParseErrorHandlePref(const char* aPrefName, PrefType aType,
|
||||
PrefValueKind aKind, PrefValue aValue,
|
||||
bool aIsSticky, bool aIsLocked) {}
|
||||
|
||||
MOZ_CONSTINIT static nsCString gTestParseErrorMsgs;
|
||||
MOZ_RUNINIT static nsCString gTestParseErrorMsgs;
|
||||
|
||||
static void TestParseErrorHandleError(const char* aMsg) {
|
||||
gTestParseErrorMsgs.Append(aMsg);
|
||||
|
@ -20,7 +20,7 @@
|
||||
#define GETTING_NETWORK_PROXY_TYPE_FAILED (-1)
|
||||
|
||||
static mozilla::StaticMutex sMutex;
|
||||
MOZ_CONSTINIT nsCString WPADOptionResult MOZ_GUARDED_BY(sMutex);
|
||||
MOZ_RUNINIT nsCString WPADOptionResult MOZ_GUARDED_BY(sMutex);
|
||||
|
||||
namespace mozilla {
|
||||
namespace net {
|
||||
|
@ -207,7 +207,7 @@ static const char kCrashMainID[] = "crash.main.3\n";
|
||||
|
||||
static google_breakpad::ExceptionHandler* gExceptionHandler = nullptr;
|
||||
static mozilla::Atomic<bool> gEncounteredChildException(false);
|
||||
MOZ_CONSTINIT static nsCString gServerURL;
|
||||
MOZ_RUNINIT static nsCString gServerURL;
|
||||
|
||||
MOZ_RUNINIT static xpstring pendingDirectory;
|
||||
MOZ_RUNINIT static xpstring crashReporterPath;
|
||||
|
@ -328,10 +328,10 @@ int gKioskMonitor = -1;
|
||||
|
||||
bool gAllowContentAnalysisArgPresent = false;
|
||||
|
||||
MOZ_CONSTINIT nsString gAbsoluteArgv0Path;
|
||||
MOZ_RUNINIT nsString gAbsoluteArgv0Path;
|
||||
|
||||
#if defined(XP_WIN)
|
||||
MOZ_CONSTINIT nsString gProcessStartupShortcut;
|
||||
MOZ_RUNINIT nsString gProcessStartupShortcut;
|
||||
#endif
|
||||
|
||||
#if defined(MOZ_WIDGET_GTK)
|
||||
@ -1287,8 +1287,8 @@ nsXULAppInfo::GetRemoteType(nsACString& aRemoteType) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
MOZ_CONSTINIT static nsCString gLastAppVersion;
|
||||
MOZ_CONSTINIT static nsCString gLastAppBuildID;
|
||||
MOZ_RUNINIT static nsCString gLastAppVersion;
|
||||
MOZ_RUNINIT static nsCString gLastAppBuildID;
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXULAppInfo::GetLastAppVersion(nsACString& aResult) {
|
||||
|
@ -94,8 +94,7 @@ struct nsCharTraits<char16_t> {
|
||||
typedef uint16_t unsigned_char_type;
|
||||
typedef char incompatible_char_type;
|
||||
|
||||
static constexpr char_type gNullChar = 0;
|
||||
static constexpr char_type* sEmptyBuffer = const_cast<char_type*>(&gNullChar);
|
||||
static char_type* const sEmptyBuffer;
|
||||
|
||||
// integer representation of characters:
|
||||
typedef int int_type;
|
||||
@ -283,8 +282,7 @@ struct nsCharTraits<char> {
|
||||
typedef unsigned char unsigned_char_type;
|
||||
typedef char16_t incompatible_char_type;
|
||||
|
||||
static constexpr char_type gNullChar = 0;
|
||||
static constexpr char_type* sEmptyBuffer = const_cast<char_type*>(&gNullChar);
|
||||
static char_type* const sEmptyBuffer;
|
||||
|
||||
// integer representation of characters:
|
||||
|
||||
|
@ -68,7 +68,7 @@ class nsTString : public nsTSubstring<T> {
|
||||
* constructors
|
||||
*/
|
||||
|
||||
constexpr nsTString() : substring_type(ClassFlags::NULL_TERMINATED) {}
|
||||
nsTString() : substring_type(ClassFlags::NULL_TERMINATED) {}
|
||||
|
||||
explicit nsTString(const char_type* aData, size_type aLength = size_type(-1))
|
||||
: substring_type(ClassFlags::NULL_TERMINATED) {
|
||||
|
@ -44,6 +44,15 @@ using double_conversion::DoubleToStringConverter;
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
static const char16_t gNullChar = 0;
|
||||
|
||||
char* const nsCharTraits<char>::sEmptyBuffer =
|
||||
(char*)const_cast<char16_t*>(&gNullChar);
|
||||
char16_t* const nsCharTraits<char16_t>::sEmptyBuffer =
|
||||
const_cast<char16_t*>(&gNullChar);
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
static void ReleaseData(void* aData, nsAString::DataFlags aFlags) {
|
||||
if (aFlags & nsAString::DataFlags::REFCOUNTED) {
|
||||
mozilla::StringBuffer::FromData(aData)->Release();
|
||||
|
@ -1182,7 +1182,7 @@ class nsTSubstring : public mozilla::detail::nsTStringRepr<T> {
|
||||
}
|
||||
|
||||
protected:
|
||||
constexpr void AssertValid() {
|
||||
void AssertValid() {
|
||||
MOZ_DIAGNOSTIC_ASSERT(!(this->mClassFlags & ClassFlags::INVALID_MASK));
|
||||
MOZ_DIAGNOSTIC_ASSERT(!(this->mDataFlags & DataFlags::INVALID_MASK));
|
||||
MOZ_ASSERT(!(this->mClassFlags & ClassFlags::NULL_TERMINATED) ||
|
||||
@ -1251,7 +1251,7 @@ class nsTSubstring : public mozilla::detail::nsTStringRepr<T> {
|
||||
}
|
||||
|
||||
// initialization with ClassFlags
|
||||
constexpr explicit nsTSubstring(ClassFlags aClassFlags)
|
||||
explicit nsTSubstring(ClassFlags aClassFlags)
|
||||
: base_string_type(char_traits::sEmptyBuffer, 0, DataFlags::TERMINATED,
|
||||
aClassFlags) {
|
||||
AssertValid();
|
||||
|
Loading…
Reference in New Issue
Block a user