Bug 1597191 - Removed redundant assertions. r=dom-workers-and-storage-reviewers,ytausky

Assertions on the type of an IPDL-defined union before accessing it are redundant,
since the generated accessors already contain a MOZ_RELEASE_ASSERT for checking
the type. Redundant assertions unnecessarily clutter the code, so they are removed.

Differential Revision: https://phabricator.services.mozilla.com/D53797

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Simon Giesecke 2019-11-19 14:15:32 +00:00
Родитель 49f97fef21
Коммит 520df3754a
1 изменённых файлов: 0 добавлений и 12 удалений

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

@ -25814,9 +25814,6 @@ nsresult Cursor::CursorOpBase::PopulateResponseFromStatement(
if (aInitializeResponse) {
mResponse = nsTArray<ObjectStoreCursorResponse>();
} else {
MOZ_ASSERT(mResponse.type() ==
CursorResponse::TArrayOfObjectStoreCursorResponse);
}
auto& responses = mResponse.get_ArrayOfObjectStoreCursorResponse();
@ -25831,9 +25828,6 @@ nsresult Cursor::CursorOpBase::PopulateResponseFromStatement(
case OpenCursorParams::TObjectStoreOpenKeyCursorParams: {
if (aInitializeResponse) {
mResponse = nsTArray<ObjectStoreKeyCursorResponse>();
} else {
MOZ_ASSERT(mResponse.type() ==
CursorResponse::TArrayOfObjectStoreKeyCursorResponse);
}
auto& responses = mResponse.get_ArrayOfObjectStoreKeyCursorResponse();
@ -25868,9 +25862,6 @@ nsresult Cursor::CursorOpBase::PopulateResponseFromStatement(
if (aInitializeResponse) {
mResponse = nsTArray<IndexCursorResponse>();
} else {
MOZ_ASSERT(mResponse.type() ==
CursorResponse::TArrayOfIndexCursorResponse);
}
auto& responses = mResponse.get_ArrayOfIndexCursorResponse();
@ -25897,9 +25888,6 @@ nsresult Cursor::CursorOpBase::PopulateResponseFromStatement(
if (aInitializeResponse) {
mResponse = nsTArray<IndexKeyCursorResponse>();
} else {
MOZ_ASSERT(mResponse.type() ==
CursorResponse::TArrayOfIndexKeyCursorResponse);
}
auto& responses = mResponse.get_ArrayOfIndexKeyCursorResponse();