mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1157754 part 2. Convert consumers of ErrorResult::ClearMessage() to the new better APIs we have for suppressing exceptions on ErrorResult. r=bkelly
This commit is contained in:
parent
948fb6f6e6
commit
4fd0c4fc34
2
dom/cache/CacheOpParent.cpp
vendored
2
dom/cache/CacheOpParent.cpp
vendored
@ -195,7 +195,7 @@ CacheOpParent::OnOpComplete(ErrorResult&& aRv, const CacheOpResult& aResult,
|
||||
// void_t() to ensure that we don't leak actors on the child side.
|
||||
if (aRv.Failed()) {
|
||||
unused << Send__delete__(this, aRv, void_t());
|
||||
aRv.ClearMessage(); // This may contain a TypeError.
|
||||
aRv.SuppressException(); // We serialiazed it, as best we could.
|
||||
return;
|
||||
}
|
||||
|
||||
|
4
dom/cache/DBSchema.cpp
vendored
4
dom/cache/DBSchema.cpp
vendored
@ -983,14 +983,14 @@ MatchByVaryHeader(mozIStorageConnection* aConn,
|
||||
nsAutoCString queryValue;
|
||||
queryHeaders->Get(header, queryValue, errorResult);
|
||||
if (errorResult.Failed()) {
|
||||
errorResult.ClearMessage();
|
||||
errorResult.SuppressException();
|
||||
MOZ_ASSERT(queryValue.IsEmpty());
|
||||
}
|
||||
|
||||
nsAutoCString cachedValue;
|
||||
cachedHeaders->Get(header, cachedValue, errorResult);
|
||||
if (errorResult.Failed()) {
|
||||
errorResult.ClearMessage();
|
||||
errorResult.SuppressException();
|
||||
MOZ_ASSERT(cachedValue.IsEmpty());
|
||||
}
|
||||
|
||||
|
7
dom/cache/FetchPut.cpp
vendored
7
dom/cache/FetchPut.cpp
vendored
@ -160,7 +160,8 @@ FetchPut::~FetchPut()
|
||||
MOZ_ASSERT(!mListener);
|
||||
mManager->RemoveListener(this);
|
||||
mManager->ReleaseCacheId(mCacheId);
|
||||
mResult.ClearMessage(); // This may contain a TypeError.
|
||||
mResult.SuppressException(); // XXXbz should we really be ending up here with
|
||||
// a failed mResult we never reported to anyone?
|
||||
}
|
||||
|
||||
nsresult
|
||||
@ -389,14 +390,14 @@ FetchPut::MatchInPutList(const CacheRequest& aRequest,
|
||||
nsAutoCString value;
|
||||
requestHeaders->Get(header, value, headerRv);
|
||||
if (NS_WARN_IF(headerRv.Failed())) {
|
||||
headerRv.ClearMessage();
|
||||
headerRv.SuppressException();
|
||||
MOZ_ASSERT(value.IsEmpty());
|
||||
}
|
||||
|
||||
nsAutoCString cachedValue;
|
||||
cachedRequestHeaders->Get(header, value, headerRv);
|
||||
if (NS_WARN_IF(headerRv.Failed())) {
|
||||
headerRv.ClearMessage();
|
||||
headerRv.SuppressException();
|
||||
MOZ_ASSERT(cachedValue.IsEmpty());
|
||||
}
|
||||
|
||||
|
@ -634,7 +634,7 @@ public:
|
||||
NS_WARNING(nsPrintfCString("Fetch ignoring illegal header - '%s': '%s'",
|
||||
PromiseFlatCString(aHeader).get(),
|
||||
PromiseFlatCString(aValue).get()).get());
|
||||
result.ClearMessage();
|
||||
result.SuppressException();
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user