mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-08-15 08:53:07 +09:00
[MFBT] Convert debug asserts to early returns for situations that should
never occur.
This commit is contained in:
parent
d1d00498ae
commit
daa57bddf7
1 changed files with 4 additions and 2 deletions
|
|
@ -327,7 +327,8 @@ private:
|
|||
void setNextUnsafe(RawType aElem)
|
||||
{
|
||||
LinkedListElement *listElem = static_cast<LinkedListElement*>(aElem);
|
||||
MOZ_ASSERT(!listElem->isInList());
|
||||
if (listElem->isInList())
|
||||
return;
|
||||
|
||||
listElem->mNext = this->mNext;
|
||||
listElem->mPrev = this;
|
||||
|
|
@ -344,7 +345,8 @@ private:
|
|||
void setPreviousUnsafe(RawType aElem)
|
||||
{
|
||||
LinkedListElement<T>* listElem = static_cast<LinkedListElement<T>*>(aElem);
|
||||
MOZ_ASSERT(!listElem->isInList());
|
||||
if (listElem->isInList())
|
||||
return;
|
||||
|
||||
listElem->mNext = this;
|
||||
listElem->mPrev = this->mPrev;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue