mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1143894 - Part 1: Clear the ErrorResult message if InternalHeaders::Get fails; r=bkelly
InternalHeaders::Get() may throw NS_ERROR_TYPE_ERR with an associated message. The semantics of ErrorResult dictate that the message needs to be consumed by the time that the object gets destroyed, so we need to clear it before returning in these two places.
This commit is contained in:
parent
0dbf1fb8f5
commit
01349908f4
10
dom/cache/DBSchema.cpp
vendored
10
dom/cache/DBSchema.cpp
vendored
@ -821,11 +821,17 @@ DBSchema::MatchByVaryHeader(mozIStorageConnection* aConn,
|
|||||||
|
|
||||||
nsAutoCString queryValue;
|
nsAutoCString queryValue;
|
||||||
queryHeaders->Get(varyValues[i], queryValue, errorResult);
|
queryHeaders->Get(varyValues[i], queryValue, errorResult);
|
||||||
if (errorResult.Failed()) { return errorResult.ErrorCode(); };
|
if (errorResult.Failed()) {
|
||||||
|
errorResult.ClearMessage();
|
||||||
|
return errorResult.ErrorCode();
|
||||||
|
}
|
||||||
|
|
||||||
nsAutoCString cachedValue;
|
nsAutoCString cachedValue;
|
||||||
cachedHeaders->Get(varyValues[i], cachedValue, errorResult);
|
cachedHeaders->Get(varyValues[i], cachedValue, errorResult);
|
||||||
if (errorResult.Failed()) { return errorResult.ErrorCode(); };
|
if (errorResult.Failed()) {
|
||||||
|
errorResult.ClearMessage();
|
||||||
|
return errorResult.ErrorCode();
|
||||||
|
}
|
||||||
|
|
||||||
if (queryValue != cachedValue) {
|
if (queryValue != cachedValue) {
|
||||||
varyHeadersMatch = false;
|
varyHeadersMatch = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user