summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2022-01-04 22:55:11 +0100
committerLinus Groh <mail@linusgroh.de>2022-01-04 23:37:26 +0000
commitbfa42cbe4f638ec5b03ff6ecacc3d276fac6afad (patch)
tree663828e2643d8b8f44706a1eac3784e50a876f14
parent9e50bd91a6d7ceb9a00ce0d66443de578bb31023 (diff)
downloadserenity-bfa42cbe4f638ec5b03ff6ecacc3d276fac6afad.zip
LibJS: Remove the now retired TRY_OR_DISCARD() macro :^)
-rw-r--r--Userland/Libraries/LibJS/Runtime/Completion.h11
1 files changed, 0 insertions, 11 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/Completion.h b/Userland/Libraries/LibJS/Runtime/Completion.h
index fc04a38b1d..1a10005608 100644
--- a/Userland/Libraries/LibJS/Runtime/Completion.h
+++ b/Userland/Libraries/LibJS/Runtime/Completion.h
@@ -15,17 +15,6 @@
namespace JS {
-// Temporary helper akin to TRY(), but returning a default-constructed type (e.g. empty JS::Value)
-// instead of the throw completion record. Use this as the bridge between functions that have
-// already been updated to use completions and functions that haven't.
-#define TRY_OR_DISCARD(expression) \
- ({ \
- auto _temporary_result = (expression); \
- if (_temporary_result.is_error()) \
- return {}; \
- _temporary_result.release_value(); \
- })
-
// 6.2.3 The Completion Record Specification Type, https://tc39.es/ecma262/#sec-completion-record-specification-type
class [[nodiscard]] Completion {
public: