Bug #172253 was caused by accidentally calling releaseReturnValue() twice on the same ExceptionOr value. This is a mistake because releaseReturnValue() moves the return value. We should ASSERT that releaseReturnValue() hasn't been called more than once.
I guess we can do this. We do this for Ref by asserting the pointer is not null in Ref::leakRef. We don’t do this for RefPtr. Longer term I think we want to move from ExceptionOr to std::expected. Is that right? If so, we should figure out if std::expected can assert for cases like this.