From d174bc1285f4704fe2cd1154bcde7f3e1f3eab32 Mon Sep 17 00:00:00 2001 From: Simon Giesecke Date: Wed, 4 Dec 2019 12:48:38 +0000 Subject: [PATCH] Bug 1596129 - Removed redundant assertions after infallible EmplaceBack calls. r=dom-workers-and-storage-reviewers,ytausky Differential Revision: https://phabricator.services.mozilla.com/D53932 --HG-- extra : moz-landing-system : lando --- dom/indexedDB/ActorsChild.cpp | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/dom/indexedDB/ActorsChild.cpp b/dom/indexedDB/ActorsChild.cpp index 203e7ac57d34..bc9fa52df9dd 100644 --- a/dom/indexedDB/ActorsChild.cpp +++ b/dom/indexedDB/ActorsChild.cpp @@ -532,9 +532,7 @@ auto DeserializeStructuredCloneFiles( RefPtr blob = Blob::Create(aDatabase->GetOwnerGlobal(), blobImpl); MOZ_ASSERT(blob); - const DebugOnly file = - files.EmplaceBack(StructuredCloneFile::eBlob, std::move(blob)); - MOZ_ASSERT(file); + files.EmplaceBack(StructuredCloneFile::eBlob, std::move(blob)); break; } @@ -546,9 +544,7 @@ auto DeserializeStructuredCloneFiles( switch (blobOrMutableFile.type()) { case BlobOrMutableFile::Tnull_t: { - const DebugOnly file = - files.EmplaceBack(StructuredCloneFile::eMutableFile); - MOZ_ASSERT(file); + files.EmplaceBack(StructuredCloneFile::eMutableFile); break; } @@ -564,9 +560,7 @@ auto DeserializeStructuredCloneFiles( static_cast(actor->GetDOMObject()); MOZ_ASSERT(mutableFile); - const DebugOnly file = - files.EmplaceBack(mutableFile); - MOZ_ASSERT(file); + files.EmplaceBack(mutableFile); actor->ReleaseDOMObject(); @@ -593,15 +587,12 @@ auto DeserializeStructuredCloneFiles( Blob::Create(aDatabase->GetOwnerGlobal(), blobImpl); MOZ_ASSERT(blob); - const DebugOnly file = files.EmplaceBack( - StructuredCloneFile::eStructuredClone, std::move(blob)); - MOZ_ASSERT(file); + files.EmplaceBack(StructuredCloneFile::eStructuredClone, + std::move(blob)); } else { MOZ_ASSERT(blobOrMutableFile.type() == BlobOrMutableFile::Tnull_t); - const DebugOnly file = - files.EmplaceBack(StructuredCloneFile::eStructuredClone); - MOZ_ASSERT(file); + files.EmplaceBack(StructuredCloneFile::eStructuredClone); } break; @@ -611,9 +602,7 @@ auto DeserializeStructuredCloneFiles( case StructuredCloneFile::eWasmCompiled: { MOZ_ASSERT(blobOrMutableFile.type() == BlobOrMutableFile::Tnull_t); - const DebugOnly file = - files.EmplaceBack(serializedFile.type()); - MOZ_ASSERT(file); + files.EmplaceBack(serializedFile.type()); // Don't set mBlob, support for storing WebAssembly.Modules has been // removed in bug 1469395. Support for de-serialization of