mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-02 15:46:33 +00:00
LibJS: Remove the now retired TRY_OR_DISCARD() macro :^)
This commit is contained in:
parent
9e50bd91a6
commit
bfa42cbe4f
Notes:
sideshowbarker
2024-07-17 21:38:21 +09:00
Author: https://github.com/linusg
Commit: bfa42cbe4f
Pull-request: https://github.com/SerenityOS/serenity/pull/11626
Reviewed-by: https://github.com/IdanHo ✅
1 changed files with 0 additions and 11 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue