Bug 1928157 - Stopgap bustage fix, adding MOZ_RUNINIT to Windows and Mac specific files. r=john.bieling
Differential Revision: https://phabricator.services.mozilla.com/D227418 --HG-- extra : amend_source : b897d3aef1352c807d05365462a28e482be88468
This commit is contained in:
Родитель
f63ca10344
Коммит
948397bace
|
@ -3,6 +3,7 @@
|
|||
* 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/. */
|
||||
|
||||
#include "mozilla/Attributes.h"
|
||||
#include <SearchAPI.h>
|
||||
#include <shellapi.h>
|
||||
#include <objbase.h>
|
||||
|
@ -32,7 +33,7 @@ struct RegKey {
|
|||
: mRoot(aRoot), mSubKey(aSubKey), mName(aName), mValue(aValue) {}
|
||||
};
|
||||
|
||||
static const RegKey* const sRegKeys[] = {
|
||||
MOZ_RUNINIT static const RegKey* const sRegKeys[] = {
|
||||
new RegKey(HKEY_LOCAL_MACHINE,
|
||||
L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\PropertySystem\\"
|
||||
L"PropertyHandlers\\.wdseml",
|
||||
|
|
|
@ -52,7 +52,7 @@ void AppendToCString(const NSString* aString, nsCString& aResult) {
|
|||
{osx_property, osx_label, osx_key, #moz_name},
|
||||
|
||||
// clang-format off
|
||||
const nsAbOSXPropertyMap nsAbOSXUtils::kPropertyMap[] = {
|
||||
MOZ_RUNINIT const nsAbOSXPropertyMap nsAbOSXUtils::kPropertyMap[] = {
|
||||
DEFINE_PROPERTY(FirstName, kABFirstNameProperty, nil, nil)
|
||||
DEFINE_PROPERTY(LastName, kABLastNameProperty, nil, nil)
|
||||
DONT_MAP("DisplayName", nil, nil, nil)
|
||||
|
|
|
@ -101,7 +101,7 @@ NOTIFYICONDATAW sMailIconData = {
|
|||
/* szInfoTitle */ L"",
|
||||
/* dwInfoFlags */ NIIF_USER | NIIF_NOSOUND};
|
||||
|
||||
static nsCOMArray<nsIBaseWindow> sHiddenWindows;
|
||||
MOZ_RUNINIT static nsCOMArray<nsIBaseWindow> sHiddenWindows;
|
||||
static HWND sIconWindow;
|
||||
static uint32_t sUnreadCount;
|
||||
/* static */
|
||||
|
|
|
@ -190,7 +190,7 @@ nsOutlookCompose::~nsOutlookCompose() {
|
|||
delete[] m_optimizationBuffer;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIMsgIdentity> nsOutlookCompose::m_pIdentity = nullptr;
|
||||
MOZ_RUNINIT nsCOMPtr<nsIMsgIdentity> nsOutlookCompose::m_pIdentity = nullptr;
|
||||
|
||||
nsresult nsOutlookCompose::CreateIdentity(void) {
|
||||
if (m_pIdentity) return NS_OK;
|
||||
|
|
|
@ -13,7 +13,8 @@
|
|||
#define OUTLOOK_MSGS_URL \
|
||||
"chrome://messenger/locale/outlookImportMsgs.properties"
|
||||
|
||||
nsCOMPtr<nsIStringBundle> nsOutlookStringBundle::m_pBundle = nullptr;
|
||||
MOZ_RUNINIT nsCOMPtr<nsIStringBundle> nsOutlookStringBundle::m_pBundle =
|
||||
nullptr;
|
||||
|
||||
void nsOutlookStringBundle::GetStringBundle(void) {
|
||||
if (m_pBundle) return;
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
#define WM_MSGS_URL "chrome://messenger/locale/wmImportMsgs.properties"
|
||||
|
||||
nsCOMPtr<nsIStringBundle> nsWMStringBundle::m_pBundle = nullptr;
|
||||
MOZ_RUNINIT nsCOMPtr<nsIStringBundle> nsWMStringBundle::m_pBundle = nullptr;
|
||||
|
||||
void nsWMStringBundle::GetStringBundle(void) {
|
||||
if (m_pBundle) return;
|
||||
|
|
|
@ -318,10 +318,10 @@ class Lexem {
|
|||
}
|
||||
};
|
||||
|
||||
Lexem Lexem::eof(ltEOF);
|
||||
Lexem Lexem::groupBegin(ltGroupBegin);
|
||||
Lexem Lexem::groupEnd(ltGroupEnd);
|
||||
Lexem Lexem::error(ltError);
|
||||
MOZ_RUNINIT Lexem Lexem::eof(ltEOF);
|
||||
MOZ_RUNINIT Lexem Lexem::groupBegin(ltGroupBegin);
|
||||
MOZ_RUNINIT Lexem Lexem::groupEnd(ltGroupEnd);
|
||||
MOZ_RUNINIT Lexem Lexem::error(ltError);
|
||||
|
||||
// This function moves pos. When calling the function, pos must be next to the
|
||||
// backslash; pos must be in the same sequence and before end!
|
||||
|
@ -371,8 +371,7 @@ void GetLexem(std::istream& stream, Lexem& result) {
|
|||
// - if it's 0x09 -> it's the keyword \tab
|
||||
// - else it's a PCDATA
|
||||
char ch;
|
||||
while (!stream.get(ch).eof() && ((ch == '\n') || (ch == '\r')))
|
||||
; // Skip crlf
|
||||
while (!stream.get(ch).eof() && ((ch == '\n') || (ch == '\r'))); // Skip crlf
|
||||
if (stream.eof())
|
||||
result = Lexem::eof;
|
||||
else {
|
||||
|
|
Загрузка…
Ссылка в новой задаче