зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1891332 - Replace debug MOZ_ASSERT with MOZ_RELEASE_ASSERT in netwerk tests. r=necko-reviewers,kershaw,valentin
MOZ_ASSERT is only checked in debug builds, so release builds' tests are not checking these assertions. Depends on D207374 Differential Revision: https://phabricator.services.mozilla.com/D207375
This commit is contained in:
Родитель
d55c7573ed
Коммит
360d2cb741
|
@ -17,8 +17,8 @@ class WaitForCondition final : public nsIRunnable {
|
|||
NS_DECL_THREADSAFE_ISUPPORTS
|
||||
|
||||
void Wait(int pending) {
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
MOZ_ASSERT(mPending == 0);
|
||||
MOZ_RELEASE_ASSERT(NS_IsMainThread());
|
||||
MOZ_RELEASE_ASSERT(mPending == 0);
|
||||
|
||||
mPending = pending;
|
||||
mozilla::SpinEventLoopUntil("TestCommon.h:WaitForCondition::Wait"_ns,
|
||||
|
@ -32,8 +32,8 @@ class WaitForCondition final : public nsIRunnable {
|
|||
virtual ~WaitForCondition() = default;
|
||||
|
||||
NS_IMETHOD Run() override {
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
MOZ_ASSERT(mPending);
|
||||
MOZ_RELEASE_ASSERT(NS_IsMainThread());
|
||||
MOZ_RELEASE_ASSERT(mPending);
|
||||
|
||||
--mPending;
|
||||
return NS_OK;
|
||||
|
|
|
@ -95,7 +95,7 @@ void SetACookieInternal(nsICookieService* aCookieService, const char* aSpec,
|
|||
/* shouldResistFingerprinting */ false)
|
||||
: CookieJarSettings::GetBlockingAll(
|
||||
/* shouldResistFingerprinting */ false);
|
||||
MOZ_ASSERT(cookieJarSettings);
|
||||
MOZ_RELEASE_ASSERT(cookieJarSettings);
|
||||
|
||||
nsCOMPtr<nsILoadInfo> loadInfo = dummyChannel->LoadInfo();
|
||||
loadInfo->SetCookieJarSettings(cookieJarSettings);
|
||||
|
@ -140,7 +140,7 @@ void GetACookieNoHttp(nsICookieService* aCookieService, const char* aSpec,
|
|||
|
||||
RefPtr<BasePrincipal> principal =
|
||||
BasePrincipal::CreateContentPrincipal(uri, OriginAttributes());
|
||||
MOZ_ASSERT(principal);
|
||||
MOZ_RELEASE_ASSERT(principal);
|
||||
|
||||
nsCOMPtr<mozilla::dom::Document> document;
|
||||
nsresult rv = NS_NewDOMDocument(getter_AddRefs(document),
|
||||
|
|
|
@ -29,7 +29,7 @@ void CreateStream(already_AddRefed<nsIInputStream> aSource,
|
|||
ASSERT_EQ(NS_OK, rv);
|
||||
|
||||
nsCOMPtr<nsIAsyncInputStream> asyncStream = do_QueryInterface(wrapper);
|
||||
MOZ_ASSERT(asyncStream);
|
||||
MOZ_RELEASE_ASSERT(asyncStream);
|
||||
|
||||
asyncStream.forget(aStream);
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ class Event {
|
|||
|
||||
void Set() {
|
||||
MonitorAutoLock lock(mMonitor);
|
||||
MOZ_ASSERT(!mSignaled);
|
||||
MOZ_RELEASE_ASSERT(!mSignaled);
|
||||
mSignaled = true;
|
||||
mMonitor.Notify();
|
||||
}
|
||||
|
|
|
@ -85,7 +85,7 @@ class TestWifiMonitor : public ::testing::Test {
|
|||
public:
|
||||
TestWifiMonitor() {
|
||||
mObs = mozilla::services::GetObserverService();
|
||||
MOZ_ASSERT(mObs);
|
||||
MOZ_RELEASE_ASSERT(mObs);
|
||||
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsINetworkLinkService> nls =
|
||||
|
@ -312,7 +312,7 @@ class TestWifiMonitor : public ::testing::Test {
|
|||
LOGI(("RunSingleTest: <%s, %s> | requestPolling: %s | shouldPoll: %s",
|
||||
aTopic, NS_ConvertUTF16toUTF8(aData).get(),
|
||||
aRequestPolling ? "true" : "false", aShouldPoll ? "true" : "false"));
|
||||
MOZ_ASSERT(aShouldPoll || !aRequestPolling);
|
||||
MOZ_RELEASE_ASSERT(aShouldPoll || !aRequestPolling);
|
||||
|
||||
CreateObjects();
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче