Bug 1760651 - nsIOService thread-safety annotations r=necko-reviewers,dragana

Differential Revision: https://phabricator.services.mozilla.com/D141658
This commit is contained in:
Randell Jesup 2022-03-21 20:01:21 +00:00
Родитель 300bcc9619
Коммит ffb7ef2b49
2 изменённых файлов: 5 добавлений и 2 удалений

Просмотреть файл

@ -269,7 +269,10 @@ nsresult nsIOService::Init() {
// setup our bad port list stuff
for (int i = 0; gBadPortList[i]; i++) {
// We can't be accessed by another thread yet
PUSH_IGNORE_THREAD_SAFETY
mRestrictedPortList.AppendElement(gBadPortList[i]);
POP_THREAD_SAFETY
}
// Further modifications to the port list come from prefs

Просмотреть файл

@ -232,8 +232,8 @@ class nsIOService final : public nsIIOService,
nsCategoryCache<nsIChannelEventSink> mChannelEventSinks{
NS_CHANNEL_EVENT_SINK_CATEGORY};
Mutex mMutex MOZ_UNANNOTATED{"nsIOService::mMutex"};
nsTArray<int32_t> mRestrictedPortList;
Mutex mMutex{"nsIOService::mMutex"};
nsTArray<int32_t> mRestrictedPortList GUARDED_BY(mMutex);
uint32_t mTotalRequests{0};
uint32_t mCacheWon{0};