aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js/bindings/ExceptionOr.h
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <jarred@jarredsumner.com> 2023-06-17 19:18:02 -0700
committerGravatar GitHub <noreply@github.com> 2023-06-17 19:18:02 -0700
commit65f1e426849aa705c0fd7578134b8287f10d0176 (patch)
tree134aed84da5b4bf2310a2c8dd6a9f411e9572ba4 /src/bun.js/bindings/ExceptionOr.h
parentb0e8f596a2a3a5bd3f70d6d03de35c290d34d35c (diff)
parent065713aeca2ae3013bdf5b3d2f04263459631598 (diff)
downloadbun-jarred/simplify.tar.gz
bun-jarred/simplify.tar.zst
bun-jarred/simplify.zip
Merge branch 'main' into jarred/simplifyjarred/simplify
Diffstat (limited to '')
-rw-r--r--src/bun.js/bindings/ExceptionOr.h6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/bun.js/bindings/ExceptionOr.h b/src/bun.js/bindings/ExceptionOr.h
index f3378466e..3bbc641a1 100644
--- a/src/bun.js/bindings/ExceptionOr.h
+++ b/src/bun.js/bindings/ExceptionOr.h
@@ -116,25 +116,21 @@ template<typename ReturnType> inline bool ExceptionOr<ReturnType>::hasException(
template<typename ReturnType> inline const Exception& ExceptionOr<ReturnType>::exception() const
{
- ASSERT(!m_wasReleased);
return m_value.error();
}
template<typename ReturnType> inline Exception ExceptionOr<ReturnType>::releaseException()
{
- ASSERT(!std::exchange(m_wasReleased, true));
return WTFMove(m_value.error());
}
template<typename ReturnType> inline const ReturnType& ExceptionOr<ReturnType>::returnValue() const
{
- ASSERT(!m_wasReleased);
return m_value.value();
}
template<typename ReturnType> inline ReturnType ExceptionOr<ReturnType>::releaseReturnValue()
{
- ASSERT(!std::exchange(m_wasReleased, true));
return WTFMove(m_value.value());
}
@@ -185,13 +181,11 @@ inline bool ExceptionOr<void>::hasException() const
inline const Exception& ExceptionOr<void>::exception() const
{
- ASSERT(!m_wasReleased);
return m_value.error();
}
inline Exception ExceptionOr<void>::releaseException()
{
- ASSERT(!std::exchange(m_wasReleased, true));
return WTFMove(m_value.error());
}