mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-21 01:40:46 +00:00
LibJS: Update spec steps / links for the import-assertions proposal
This proposal has reached stage 4 and been merged into the main ECMA-262
spec. See:
4e3450e
This commit is contained in:
parent
c1a3b95176
commit
3867a192a1
Notes:
github-actions[bot]
2025-04-29 11:35:05 +00:00
Author: https://github.com/trflynn89
Commit: 3867a192a1
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4514
17 changed files with 223 additions and 225 deletions
|
@ -64,26 +64,6 @@ private:
|
|||
#define TRY_OR_MUST_REJECT(vm, capability, expression) \
|
||||
__TRY_OR_REJECT(vm, capability, expression, MUST)
|
||||
|
||||
// 27.2.1.1.1 IfAbruptRejectPromise ( value, capability ), https://tc39.es/ecma262/#sec-ifabruptrejectpromise
|
||||
#define TRY_OR_REJECT_WITH_VALUE(vm, capability, expression) \
|
||||
({ \
|
||||
auto&& _temporary_try_or_reject_result = (expression); \
|
||||
/* 1. If value is an abrupt completion, then */ \
|
||||
if (_temporary_try_or_reject_result.is_error()) { \
|
||||
/* a. Perform ? Call(capability.[[Reject]], undefined, « value.[[Value]] »). */ \
|
||||
TRY(JS::call(vm, *(capability)->reject(), js_undefined(), _temporary_try_or_reject_result.release_error().value())); \
|
||||
\
|
||||
/* b. Return capability.[[Promise]]. */ \
|
||||
return Value { (capability)->promise() }; \
|
||||
} \
|
||||
\
|
||||
static_assert(!::AK::Detail::IsLvalueReference<decltype(_temporary_try_or_reject_result.release_value())>, \
|
||||
"Do not return a reference from a fallible expression"); \
|
||||
\
|
||||
/* 2. Else if value is a Completion Record, set value to value.[[Value]]. */ \
|
||||
_temporary_try_or_reject_result.release_value(); \
|
||||
})
|
||||
|
||||
// 27.2.1.5 NewPromiseCapability ( C ), https://tc39.es/ecma262/#sec-newpromisecapability
|
||||
ThrowCompletionOr<GC::Ref<PromiseCapability>> new_promise_capability(VM& vm, Value constructor);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue