1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 02:27:35 +00:00
serenity/Userland/Libraries/LibJS/Runtime
Linus Groh a53542e0a3 LibJS: Clear exception after running each queued Promise job
It's not what the spec tells us to do. In fact, the spec tells us the
exact opposite:

    9.5 Jobs and Host Operations to Enqueue Jobs
    https://tc39.es/ecma262/#sec-jobs

    A Job is an Abstract Closure with no parameters that initiates an
    ECMAScript computation when no other ECMAScript computation is
    currently in progress.
    ...
    Their implementations must conform to the following requirements:
    - ...
    - The Abstract Closure must return a normal completion, implementing
      its own handling of errors.

However, this turned out to not be true in all cases. More specifically,
the NewPromiseReactionJob AO returns the completion result of calling a
user-provided function (PromiseCapability's [[Resolve]] / [[Reject]]),
which may be an abrupt completion:

    27.2.2.1 NewPromiseReactionJob ( reaction, argument )
    https://tc39.es/ecma262/#sec-newpromisereactionjob

    1. Let job be a new Job Abstract Closure with no parameters that
       captures reaction and argument and performs the following steps
       when called:
       ...
       h. If handlerResult is an abrupt completion, then
          i. Let status be Call(promiseCapability.[[Reject]],
             undefined, « handlerResult.[[Value]] »).
       i. Else,
          i. Let status be Call(promiseCapability.[[Resolve]],
             undefined, « handlerResult.[[Value]] »).
       j. Return Completion(status).

Interestingly, this case is explicitly handled in the HTML spec's
implementation of jobs as microtasks:

    8.1.5.3.3 HostEnqueuePromiseJob(job, realm)
    https://html.spec.whatwg.org/webappapis.html#hostenqueuepromisejob

    2. Queue a microtask on the surrounding agent's event loop to
       perform the following steps:
       ...
       5. If result is an abrupt completion, then report the exception
          given by result.[[Value]].

This is precisely what all the major engines do - but not only in
browsers; the provided code snippet in the test added in this commit
works just fine in Node.js, for example.

SpiderMonkey:
https://searchfox.org/mozilla-central/rev/25997ce8267ec9e3ea4b727e0973bd9ef02bba79/js/src/builtin/Promise.cpp#6292
https://searchfox.org/mozilla-central/rev/25997ce8267ec9e3ea4b727e0973bd9ef02bba79/js/src/builtin/Promise.cpp#1277
https://searchfox.org/mozilla-central/rev/25997ce8267ec9e3ea4b727e0973bd9ef02bba79/js/src/vm/JSContext.cpp#845

JavaScriptCore:
https://trac.webkit.org/browser/webkit/trunk/Source/JavaScriptCore/builtins/PromiseOperations.js?rev=273718#L562
https://trac.webkit.org/browser/webkit/trunk/Source/JavaScriptCore/runtime/JSMicrotask.cpp?rev=273718#L94

V8:
https://source.chromium.org/chromium/chromium/src/+/main:v8/src/builtins/promise-abstract-operations.tq;l=481;drc=a760f03a6e99bf4863d8d21c5f7896a74a0a39ea
https://source.chromium.org/chromium/chromium/src/+/main:v8/src/builtins/builtins-microtask-queue-gen.cc;l=331;drc=65c9257f1777731d6d0669598f6fe6fe65fa61d3

This should probably be fixed in the ECMAScript spec to relax the rule
that Jobs may not return an abrupt completion, just like in the HTML
spec. The important bit is that those are not surfaced to user code in
any way.
2021-11-12 15:35:03 +02:00
..
Intl LibJS: Begin implementing Intl.NumberFormat.prototype.format 2021-11-12 09:17:08 +00:00
Temporal LibJS: Implement Temporal.ZonedDateTime.prototype.subtract 2021-11-12 09:24:36 +00:00
AbstractOperations.cpp LibJS+LibTest+js: Convert BC::Interpreter::run to ThrowCompletionOr<> 2021-11-12 13:01:59 +00:00
AbstractOperations.h LibJS: Add a modulo() function to represent the "x modulo y" notation 2021-11-07 21:11:31 +00:00
Accessor.h LibJS: Convert Value::invoke and VM::call to ThrowCompletionOr 2021-09-23 23:59:13 +03:00
AggregateError.cpp LibJS: Make AggregateError inherit from Error 2021-06-23 13:59:17 +01:00
AggregateError.h LibJS: Make AggregateError inherit from Error 2021-06-23 13:59:17 +01:00
AggregateErrorConstructor.cpp LibJS: Convert NativeFunction::{call,construct}() to ThrowCompletionOr 2021-10-21 09:02:23 +01:00
AggregateErrorConstructor.h LibJS: Convert NativeFunction::{call,construct}() to ThrowCompletionOr 2021-10-21 09:02:23 +01:00
AggregateErrorPrototype.cpp LibJS: Add define_direct_property and remove the define_property helper 2021-07-06 14:20:30 +01:00
AggregateErrorPrototype.h LibJS: Implement AggregateError 2021-06-11 18:49:50 +01:00
ArgumentsObject.cpp LibJS: Rename PropertyName to PropertyKey 2021-10-24 17:18:07 +02:00
ArgumentsObject.h LibJS: Rename PropertyName to PropertyKey 2021-10-24 17:18:07 +02:00
Array.cpp LibJS: Rename PropertyName to PropertyKey 2021-10-24 17:18:07 +02:00
Array.h LibJS: Rename PropertyName to PropertyKey 2021-10-24 17:18:07 +02:00
ArrayBuffer.cpp LibJS: Implement the AllocateArrayBuffer() AO 2021-10-09 12:36:28 +01:00
ArrayBuffer.h LibJS: Convert to_u8_clamp() to ThrowCompletionOr 2021-10-18 08:01:38 +03:00
ArrayBufferConstructor.cpp LibJS: Convert ArrayBufferConstructor functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
ArrayBufferConstructor.h LibJS: Convert ArrayBufferConstructor functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
ArrayBufferPrototype.cpp LibJS: Convert ArrayBufferPrototype functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
ArrayBufferPrototype.h LibJS: Convert ArrayBufferPrototype functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
ArrayConstructor.cpp LibJS: Convert ArrayConstructor functions to ThrowCompletionOr 2021-10-23 02:49:41 +03:00
ArrayConstructor.h LibJS: Convert ArrayConstructor functions to ThrowCompletionOr 2021-10-23 02:49:41 +03:00
ArrayIterator.cpp LibJS: Consistently make prototype the last argument in Object ctors 2021-06-20 12:12:39 +02:00
ArrayIterator.h LibJS: Consistently make prototype the last argument in Object ctors 2021-06-20 12:12:39 +02:00
ArrayIteratorPrototype.cpp LibJS: Convert ArrayIteratorPrototype functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
ArrayIteratorPrototype.h LibJS: Convert ArrayIteratorPrototype functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
ArrayPrototype.cpp LibJS: Rename PropertyName to PropertyKey 2021-10-24 17:18:07 +02:00
ArrayPrototype.h LibJS: Convert ArrayPrototype functions to ThrowCompletionsOr 2021-10-23 02:49:41 +03:00
AsyncFunctionConstructor.cpp LibJS: Add support for async functions 2021-11-10 08:48:27 +00:00
AsyncFunctionConstructor.h LibJS: Add support for async functions 2021-11-10 08:48:27 +00:00
AsyncFunctionDriverWrapper.cpp LibJS: Implement async functions as generator functions in BC mode 2021-11-12 13:01:59 +00:00
AsyncFunctionDriverWrapper.h LibJS: Implement async functions as generator functions in BC mode 2021-11-12 13:01:59 +00:00
AsyncFunctionPrototype.cpp LibJS: Add support for async functions 2021-11-10 08:48:27 +00:00
AsyncFunctionPrototype.h LibJS: Add support for async functions 2021-11-10 08:48:27 +00:00
AtomicsObject.cpp LibJS: Convert Atomics functions to ThrowCompletionOr 2021-10-23 19:16:03 +01:00
AtomicsObject.h LibJS: Convert Atomics functions to ThrowCompletionOr 2021-10-23 19:16:03 +01:00
BigInt.cpp LibJS: Convert the NumberToBigInt AO to ThrowCompletionOr 2021-10-23 18:01:51 +02:00
BigInt.h LibJS: Mark single argument BigInt() constructor as 'explicit' 2021-10-30 16:32:20 +02:00
BigIntConstructor.cpp LibJS: Convert BigIntConstructor functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
BigIntConstructor.h LibJS: Convert BigIntConstructor functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
BigIntObject.cpp LibJS+LibWeb+Spreadsheet: Upcall visit_edges() via Base typedef 2021-09-11 14:10:11 +02:00
BigIntObject.h LibJS: Convert this_bigint_value() to ThrowCompletionOr 2021-10-18 21:24:30 +01:00
BigIntPrototype.cpp LibJS: Convert BigIntPrototype functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
BigIntPrototype.h LibJS: Convert BigIntPrototype functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
BooleanConstructor.cpp LibJS: Convert NativeFunction::{call,construct}() to ThrowCompletionOr 2021-10-21 09:02:23 +01:00
BooleanConstructor.h LibJS: Convert NativeFunction::{call,construct}() to ThrowCompletionOr 2021-10-21 09:02:23 +01:00
BooleanObject.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
BooleanObject.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
BooleanPrototype.cpp LibJS: Convert BooleanPrototype functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
BooleanPrototype.h LibJS: Convert BooleanPrototype functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
BoundFunction.cpp LibJS: Decouple new_function_environment() from FunctionObject 2021-10-09 14:29:20 +01:00
BoundFunction.h LibJS: Decouple new_function_environment() from FunctionObject 2021-10-09 14:29:20 +01:00
CommonPropertyNames.h LibJS: Implement the required AOs for Temporal.Duration.compare 2021-11-11 21:06:54 +00:00
Completion.cpp LibJS: Remove left-over debug assertion from the Await AO 2021-11-10 18:11:26 +00:00
Completion.h AK+LibJS: Simplify MUST() and move it from LibJS to AK/Try.h 2021-11-10 21:58:58 +01:00
ConsoleObject.cpp LibJS: Convert ConsoleObject functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
ConsoleObject.h LibJS: Convert ConsoleObject functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
DataView.cpp LibJS+LibWeb+Spreadsheet: Upcall visit_edges() via Base typedef 2021-09-11 14:10:11 +02:00
DataView.h LibJS: Consistently make prototype the last argument in Object ctors 2021-06-20 12:12:39 +02:00
DataViewConstructor.cpp LibJS: Convert NativeFunction::{call,construct}() to ThrowCompletionOr 2021-10-21 09:02:23 +01:00
DataViewConstructor.h LibJS: Convert NativeFunction::{call,construct}() to ThrowCompletionOr 2021-10-21 09:02:23 +01:00
DataViewPrototype.cpp LibJS: Convert DataViewPrototype functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
DataViewPrototype.h LibJS: Convert DataViewPrototype functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
Date.cpp LibJS: Adjust approximated result in year_from_time() if necessary 2021-11-05 01:18:27 +01:00
Date.h LibJS: Adjust approximated result in year_from_time() if necessary 2021-11-05 01:18:27 +01:00
DateConstructor.cpp LibJS: Convert DateConstructor functions to ThrowCompletionOr 2021-10-23 18:01:51 +02:00
DateConstructor.h LibJS: Convert DateConstructor functions to ThrowCompletionOr 2021-10-23 18:01:51 +02:00
DatePrototype.cpp LibJS: Convert DatePrototype functions to ThrowCompletionOr 2021-10-23 18:01:51 +02:00
DatePrototype.h LibJS: Convert DatePrototype functions to ThrowCompletionOr 2021-10-23 18:01:51 +02:00
DeclarativeEnvironment.cpp LibJS: Convert delete_binding() to ThrowCompletionOr 2021-10-09 21:53:47 +01:00
DeclarativeEnvironment.h LibJS: Convert delete_binding() to ThrowCompletionOr 2021-10-09 21:53:47 +01:00
ECMAScriptFunctionObject.cpp LibJS+LibTest+js: Convert BC::Interpreter::run to ThrowCompletionOr<> 2021-11-12 13:01:59 +00:00
ECMAScriptFunctionObject.h LibJS: Add support for async functions 2021-11-10 08:48:27 +00:00
Environment.cpp LibJS: Taint variable environment chain after non-strict direct eval() 2021-10-07 11:53:18 +02:00
Environment.h LibJS: Convert delete_binding() to ThrowCompletionOr 2021-10-09 21:53:47 +01:00
EnvironmentCoordinate.h LibJS: Add missing header in EnvironmentCoordinate.h 2021-10-20 09:20:18 +01:00
Error.cpp LibJS: Convert has_property() to ThrowCompletionOr 2021-10-03 20:14:03 +01:00
Error.h LibJS: Convert install_error_cause() to ThrowCompletionOr 2021-10-03 20:14:03 +01:00
ErrorConstructor.cpp LibJS: Convert NativeFunction::{call,construct}() to ThrowCompletionOr 2021-10-21 09:02:23 +01:00
ErrorConstructor.h LibJS: Convert NativeFunction::{call,construct}() to ThrowCompletionOr 2021-10-21 09:02:23 +01:00
ErrorPrototype.cpp LibJS: Convert ErrorPrototype functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
ErrorPrototype.h LibJS: Convert ErrorPrototype functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
ErrorTypes.cpp Userland: Use mattco@serenityos.org for my copyright headers 2021-04-23 08:24:53 +02:00
ErrorTypes.h LibJS: Implement the required AOs for Temporal.Duration.compare 2021-11-11 21:06:54 +00:00
Exception.cpp LibJS: Rename CallFrame => ExecutionContext 2021-06-24 19:28:00 +02:00
Exception.h LibJS: Avoid allocations in the Exception constructor 2021-06-03 14:47:15 +01:00
ExecutionContext.h LibJS: Add support for async functions 2021-11-10 08:48:27 +00:00
FinalizationRegistry.cpp LibJS: Make WeakContainer pruning do less work 2021-10-05 18:52:00 +02:00
FinalizationRegistry.h LibJS: Make WeakContainer pruning do less work 2021-10-05 18:52:00 +02:00
FinalizationRegistryConstructor.cpp LibJS: Convert NativeFunction::{call,construct}() to ThrowCompletionOr 2021-10-21 09:02:23 +01:00
FinalizationRegistryConstructor.h LibJS: Convert NativeFunction::{call,construct}() to ThrowCompletionOr 2021-10-21 09:02:23 +01:00
FinalizationRegistryPrototype.cpp LibJS: Convert FinalizationRegistryPrototype funcs to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
FinalizationRegistryPrototype.h LibJS: Convert FinalizationRegistryPrototype funcs to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
FunctionConstructor.cpp LibJS: Add support for async functions 2021-11-10 08:48:27 +00:00
FunctionConstructor.h LibJS: Convert the CreateDynamicFunction AO to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
FunctionEnvironment.cpp LibJS: Use implicit ThrowCompletionOr<T> constructor where possible 2021-10-21 09:02:23 +01:00
FunctionEnvironment.h LibJS: Convert bind_this_value() to ThrowCompletionOr 2021-10-09 21:53:47 +01:00
FunctionKind.h LibJS: Implement async functions as generator functions in BC mode 2021-11-12 13:01:59 +00:00
FunctionObject.cpp LibJS: Use implicit ThrowCompletionOr<T> constructor where possible 2021-10-21 09:02:23 +01:00
FunctionObject.h LibJS: Decouple new_function_environment() from FunctionObject 2021-10-09 14:29:20 +01:00
FunctionPrototype.cpp LibJS: Convert FunctionPrototype functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
FunctionPrototype.h LibJS: Convert FunctionPrototype functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
GeneratorFunctionConstructor.cpp LibJS: Implement async functions as generator functions in BC mode 2021-11-12 13:01:59 +00:00
GeneratorFunctionConstructor.h LibJS: Convert NativeFunction::{call,construct}() to ThrowCompletionOr 2021-10-21 09:02:23 +01:00
GeneratorFunctionPrototype.cpp LibJS: Add define_direct_property and remove the define_property helper 2021-07-06 14:20:30 +01:00
GeneratorFunctionPrototype.h LibJS: Rename Function => FunctionObject 2021-06-27 22:36:04 +02:00
GeneratorObject.cpp LibJS+LibTest+js: Convert BC::Interpreter::run to ThrowCompletionOr<> 2021-11-12 13:01:59 +00:00
GeneratorObject.h LibJS: Implement async functions as generator functions in BC mode 2021-11-12 13:01:59 +00:00
GeneratorObjectPrototype.cpp LibJS: Implement async functions as generator functions in BC mode 2021-11-12 13:01:59 +00:00
GeneratorObjectPrototype.h LibJS: Convert GeneratorObjectPrototype functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
GlobalEnvironment.cpp LibJS: Use implicit ThrowCompletionOr<T> constructor where possible 2021-10-21 09:02:23 +01:00
GlobalEnvironment.h LibJS: Convert delete_binding() to ThrowCompletionOr 2021-10-09 21:53:47 +01:00
GlobalObject.cpp LibJS: Add support for async functions 2021-11-10 08:48:27 +00:00
GlobalObject.h LibJS: Convert GlobalObject to ThrowCompletionOr 2021-10-31 07:50:30 +02:00
IndexedProperties.cpp LibJS: Only do a single property lookup in internal_get_own_property() 2021-10-05 15:15:29 +02:00
IndexedProperties.h LibJS: Stop using a native property for Array lengths 2021-07-07 10:14:44 +01:00
IteratorOperations.cpp LibJS: Convert IterableToList AO to ThrowCompletionOr 2021-10-21 00:26:45 +01:00
IteratorOperations.h LibJS: Convert IterableToList AO to ThrowCompletionOr 2021-10-21 00:26:45 +01:00
IteratorPrototype.cpp LibJS: Convert %IteratorPrototype% to ThrowCompletionOr 2021-10-31 07:50:30 +02:00
IteratorPrototype.h LibJS: Convert %IteratorPrototype% to ThrowCompletionOr 2021-10-31 07:50:30 +02:00
JobCallback.h LibJS: Convert Value::invoke and VM::call to ThrowCompletionOr 2021-09-23 23:59:13 +03:00
JSONObject.cpp LibJS: Convert JSONObject functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
JSONObject.h LibJS: Convert JSONObject functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
Map.cpp LibJS+LibWeb+Spreadsheet: Upcall visit_edges() via Base typedef 2021-09-11 14:10:11 +02:00
Map.h LibJS: Use OrderedHashMap instead of HashMap in the Map built-in 2021-06-15 23:51:20 +01:00
MapConstructor.cpp LibJS: Convert MapConstructor functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
MapConstructor.h LibJS: Convert MapConstructor functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
MapIterator.cpp LibJS: Consistently make prototype the last argument in Object ctors 2021-06-20 12:12:39 +02:00
MapIterator.h LibJS: Consistently make prototype the last argument in Object ctors 2021-06-20 12:12:39 +02:00
MapIteratorPrototype.cpp LibJS: Convert MapIteratorPrototype functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
MapIteratorPrototype.h LibJS: Convert MapIteratorPrototype functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
MapPrototype.cpp LibJS: Convert MapPrototype functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
MapPrototype.h LibJS: Convert MapPrototype functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
MarkedValueList.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
MarkedValueList.h AK+Everywhere: Reduce the number of template parameters of IntrusiveList 2021-09-10 18:05:46 +03:00
MathObject.cpp LibJS: Convert MathObject functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
MathObject.h LibJS: Convert MathObject functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
NativeFunction.cpp LibJS: Convert NativeFunction::{call,construct}() to ThrowCompletionOr 2021-10-21 09:02:23 +01:00
NativeFunction.h LibJS: Convert NativeFunction::{call,construct}() to ThrowCompletionOr 2021-10-21 09:02:23 +01:00
NumberConstructor.cpp LibJS: Convert NumberConstructor functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
NumberConstructor.h LibJS: Convert NumberConstructor functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
NumberObject.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
NumberObject.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
NumberPrototype.cpp LibJS: Convert NumberPrototype functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
NumberPrototype.h LibJS: Convert NumberPrototype functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
Object.cpp LibJS: Remove leftover exception check in OrdinaryHasProperty 2021-11-09 20:32:51 +02:00
Object.h LibJS: Remove old Native Functions 2021-10-31 18:20:37 +02:00
ObjectConstructor.cpp LibJS: Convert ObjectConstructor to ThrowCompletionOr 2021-10-31 07:50:30 +02:00
ObjectConstructor.h LibJS: Convert ObjectConstructor to ThrowCompletionOr 2021-10-31 07:50:30 +02:00
ObjectEnvironment.cpp LibJS: Convert delete_binding() to ThrowCompletionOr 2021-10-09 21:53:47 +01:00
ObjectEnvironment.h LibJS: Convert delete_binding() to ThrowCompletionOr 2021-10-09 21:53:47 +01:00
ObjectPrototype.cpp LibJS: Convert Object.prototype to ThrowCompletionOr 2021-10-31 07:50:30 +02:00
ObjectPrototype.h LibJS: Convert Object.prototype to ThrowCompletionOr 2021-10-31 07:50:30 +02:00
PrimitiveString.cpp LibJS: Keep track of PrimitiveStrings and share them 2021-10-02 16:39:28 +02:00
PrimitiveString.h LibJS: Reduce UTF-8 to UTF-16 transcoding when only UTF-16 is wanted 2021-08-10 23:07:50 +02:00
PrivateEnvironment.cpp LibJS: Add parsing and evaluation of private fields and methods 2021-10-20 23:19:17 +01:00
PrivateEnvironment.h AK+Everywhere: Stop including Vector.h from StringView.h 2021-11-10 21:58:58 +01:00
Promise.cpp LibJS: Convert the PromiseResolve AO to ThrowCompletionOr 2021-10-23 18:01:51 +02:00
Promise.h LibJS: Implement async functions as generator functions in BC mode 2021-11-12 13:01:59 +00:00
PromiseConstructor.cpp LibJS: Convert PromiseConstructor functions to ThrowCompletionOr 2021-10-23 18:01:51 +02:00
PromiseConstructor.h LibJS: Convert PromiseConstructor functions to ThrowCompletionOr 2021-10-23 18:01:51 +02:00
PromiseJobs.cpp LibJS: Convert NativeFunction::{call,construct}() to ThrowCompletionOr 2021-10-21 09:02:23 +01:00
PromiseJobs.h LibJS: Convert NativeFunction::{call,construct}() to ThrowCompletionOr 2021-10-21 09:02:23 +01:00
PromisePrototype.cpp LibJS: Convert PromisePrototype functions to ThrowCompletionOr 2021-10-23 18:01:51 +02:00
PromisePrototype.h LibJS: Convert PromisePrototype functions to ThrowCompletionOr 2021-10-23 18:01:51 +02:00
PromiseReaction.cpp LibJS: Convert the NewPromiseCapability AO to ThrowCompletionOr 2021-10-23 18:01:51 +02:00
PromiseReaction.h LibJS: Convert the NewPromiseCapability AO to ThrowCompletionOr 2021-10-23 18:01:51 +02:00
PromiseResolvingElementFunctions.cpp LibJS: Convert NativeFunction::{call,construct}() to ThrowCompletionOr 2021-10-21 09:02:23 +01:00
PromiseResolvingElementFunctions.h LibJS: Convert NativeFunction::{call,construct}() to ThrowCompletionOr 2021-10-21 09:02:23 +01:00
PromiseResolvingFunction.cpp LibJS: Convert NativeFunction::{call,construct}() to ThrowCompletionOr 2021-10-21 09:02:23 +01:00
PromiseResolvingFunction.h LibJS: Convert NativeFunction::{call,construct}() to ThrowCompletionOr 2021-10-21 09:02:23 +01:00
PropertyAttributes.h Userland: Include Vector.h in a few places to make HeaderCheck happy 2021-11-11 20:36:36 +01:00
PropertyDescriptor.cpp LibJS: Convert to_property_descriptor() to ThrowCompletionOr 2021-10-04 09:52:15 +01:00
PropertyDescriptor.h LibJS: Convert to_property_descriptor() to ThrowCompletionOr 2021-10-04 09:52:15 +01:00
PropertyKey.h LibJS: Provide default hash traits for JS::PropertyKey 2021-10-24 17:18:09 +02:00
PrototypeObject.h LibJS: Convert PrototypeObject::typed_this_value() to ThrowCompletionOr 2021-10-18 21:24:30 +01:00
ProxyConstructor.cpp LibJS: Convert ProxyConstructor functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
ProxyConstructor.h LibJS: Convert ProxyConstructor functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
ProxyObject.cpp LibJS: Make Value::to_property_key() return a JS::PropertyKey 2021-10-24 17:18:09 +02:00
ProxyObject.h LibJS: Rename PropertyName to PropertyKey 2021-10-24 17:18:07 +02:00
Realm.cpp LibJS: Add a way to get from a GlobalObject to its associated Realm 2021-10-14 23:02:19 +01:00
Realm.h LibJS: Add a way to get from a GlobalObject to its associated Realm 2021-10-14 23:02:19 +01:00
Reference.cpp LibJS: Convert the PutValue AO to ThrowCompletionOr 2021-11-02 19:48:35 +01:00
Reference.h LibJS: Convert the InitializeReferencedBinding AO to ThrowCompletionOr 2021-11-02 19:48:35 +01:00
ReflectObject.cpp LibJS: Convert ReflectObject functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
ReflectObject.h LibJS: Convert ReflectObject functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
RegExpConstructor.cpp LibJS: Convert RegExpConstructor functions to ThrowCompletionOr 2021-10-23 18:01:51 +02:00
RegExpConstructor.h LibJS: Convert RegExpConstructor functions to ThrowCompletionOr 2021-10-23 18:01:51 +02:00
RegExpObject.cpp LibJS: Convert the RegExpCreate AO to ThrowCompletionOr 2021-10-23 18:01:51 +02:00
RegExpObject.h LibJS: Convert the RegExpCreate AO to ThrowCompletionOr 2021-10-23 18:01:51 +02:00
RegExpPrototype.cpp LibJS: Create the RegExpExec result's "input" field last 2021-11-08 01:36:29 +01:00
RegExpPrototype.h LibJS: Convert RegExpPrototype functions to ThrowCompletionOr 2021-10-23 18:01:51 +02:00
RegExpStringIterator.cpp LibJS+LibWeb+Spreadsheet: Upcall visit_edges() via Base typedef 2021-09-11 14:10:11 +02:00
RegExpStringIterator.h LibJS: Reduce copying of string data in RegExp.prototype 2021-08-10 23:07:50 +02:00
RegExpStringIteratorPrototype.cpp LibJS: Convert RegExpStringIteratorPrototype to ThrowCompletionOr 2021-10-23 18:01:51 +02:00
RegExpStringIteratorPrototype.h LibJS: Convert RegExpStringIteratorPrototype to ThrowCompletionOr 2021-10-23 18:01:51 +02:00
Set.cpp LibJS+LibWeb+Spreadsheet: Upcall visit_edges() via Base typedef 2021-09-11 14:10:11 +02:00
Set.h LibJS: Use OrderedHashTable instead of HashTable in the Set built-in 2021-06-15 23:51:20 +01:00
SetConstructor.cpp LibJS: Convert SetConstructor functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
SetConstructor.h LibJS: Convert SetConstructor functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
SetIterator.cpp LibJS: Consistently make prototype the last argument in Object ctors 2021-06-20 12:12:39 +02:00
SetIterator.h LibJS: Consistently make prototype the last argument in Object ctors 2021-06-20 12:12:39 +02:00
SetIteratorPrototype.cpp LibJS: Convert SetIteratorPrototype functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
SetIteratorPrototype.h LibJS: Convert SetIteratorPrototype functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
SetPrototype.cpp LibJS: Convert SetPrototype functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
SetPrototype.h LibJS: Convert SetPrototype functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
ShadowRealm.cpp LibJS: Convert the NewPromiseCapability AO to ThrowCompletionOr 2021-10-23 18:01:51 +02:00
ShadowRealm.h LibJS: Implement ShadowRealm.prototype.importValue() 2021-10-15 09:36:21 +01:00
ShadowRealmConstructor.cpp LibJS: Convert NativeFunction::{call,construct}() to ThrowCompletionOr 2021-10-21 09:02:23 +01:00
ShadowRealmConstructor.h LibJS: Convert NativeFunction::{call,construct}() to ThrowCompletionOr 2021-10-21 09:02:23 +01:00
ShadowRealmPrototype.cpp LibJS: Convert ShadowRealmPrototype functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
ShadowRealmPrototype.h LibJS: Convert ShadowRealmPrototype functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
Shape.cpp LibJS: Rename PropertyName to PropertyKey 2021-10-24 17:18:07 +02:00
Shape.h LibJS: Rename PropertyName to PropertyKey 2021-10-24 17:18:07 +02:00
StringConstructor.cpp LibJS: Convert StringConstructor functions to ThrowCompletionOr 2021-10-23 18:01:51 +02:00
StringConstructor.h LibJS: Convert StringConstructor functions to ThrowCompletionOr 2021-10-23 18:01:51 +02:00
StringIterator.cpp LibJS: Consistently make prototype the last argument in Object ctors 2021-06-20 12:12:39 +02:00
StringIterator.h LibJS: Consistently make prototype the last argument in Object ctors 2021-06-20 12:12:39 +02:00
StringIteratorPrototype.cpp LibJS: Convert StringIteratorPrototype functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
StringIteratorPrototype.h LibJS: Convert StringIteratorPrototype functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
StringObject.cpp LibJS: Rename PropertyName to PropertyKey 2021-10-24 17:18:07 +02:00
StringObject.h LibJS: Rename PropertyName to PropertyKey 2021-10-24 17:18:07 +02:00
StringOrSymbol.h LibJS: Make StringOrSymbol always be FlyString in the string case 2021-06-13 19:11:29 +02:00
StringPrototype.cpp LibJS: Convert the RegExpCreate AO to ThrowCompletionOr 2021-10-23 18:01:51 +02:00
StringPrototype.h LibJS: Convert StringPrototype functions to ThrowCompletionOr 2021-10-23 18:01:51 +02:00
Symbol.cpp LibJS: Store and return undefined Symbol description 2021-06-15 18:31:52 +01:00
Symbol.h LibJS: Store and return undefined Symbol description 2021-06-15 18:31:52 +01:00
SymbolConstructor.cpp LibJS: Convert SymbolConstructor functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
SymbolConstructor.h LibJS: Convert SymbolConstructor functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
SymbolObject.cpp LibJS+LibWeb+Spreadsheet: Upcall visit_edges() via Base typedef 2021-09-11 14:10:11 +02:00
SymbolObject.h LibJS: Store and return undefined Symbol description 2021-06-15 18:31:52 +01:00
SymbolPrototype.cpp LibJS: Convert SymbolPrototype functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
SymbolPrototype.h LibJS: Convert SymbolPrototype functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
TemporaryClearException.h LibJS: Use linusg@serenityos.org for my new copyright headers, too 2021-04-24 20:16:31 +02:00
TypedArray.cpp LibJS: Convert typed_array_from to ThrowCompletionOr 2021-10-23 19:16:03 +01:00
TypedArray.h LibJS: Convert the IntegerIndexedElementSet AO to ThrowCompletionOr 2021-11-09 20:32:51 +02:00
TypedArrayConstructor.cpp LibJS: Convert TypedArrayConstructor functions to ThrowCompletionOr 2021-10-23 18:01:51 +02:00
TypedArrayConstructor.h LibJS: Convert TypedArrayConstructor functions to ThrowCompletionOr 2021-10-23 18:01:51 +02:00
TypedArrayPrototype.cpp LibJS: Convert TypedArrayPrototype functions to ThrowCompletionOr 2021-10-23 18:01:51 +02:00
TypedArrayPrototype.h LibJS: Convert TypedArrayPrototype functions to ThrowCompletionOr 2021-10-23 18:01:51 +02:00
Utf16String.cpp Everywhere: Pass AK::StringView by value 2021-11-11 01:27:46 +01:00
Utf16String.h Everywhere: Pass AK::StringView by value 2021-11-11 01:27:46 +01:00
Value.cpp LibJS: Tweak Value::to_property_key() fast path for Int32 2021-10-25 15:37:28 +02:00
Value.h LibJS: Make Value::to_property_key() return a JS::PropertyKey 2021-10-24 17:18:09 +02:00
VM.cpp LibJS: Clear exception after running each queued Promise job 2021-11-12 15:35:03 +02:00
VM.h LibJS: Provide default hash traits for JS::PropertyKey 2021-10-24 17:18:09 +02:00
WeakContainer.cpp LibJS: Use IntrusiveList for keeping track of WeakContainers 2021-07-21 20:17:55 +02:00
WeakContainer.h LibJS: Add missing headers 2021-10-06 23:52:40 +01:00
WeakMap.cpp LibJS: Make WeakContainer pruning do less work 2021-10-05 18:52:00 +02:00
WeakMap.h LibJS: Make WeakContainer pruning do less work 2021-10-05 18:52:00 +02:00
WeakMapConstructor.cpp LibJS: Convert NativeFunction::{call,construct}() to ThrowCompletionOr 2021-10-21 09:02:23 +01:00
WeakMapConstructor.h LibJS: Convert NativeFunction::{call,construct}() to ThrowCompletionOr 2021-10-21 09:02:23 +01:00
WeakMapPrototype.cpp LibJS: Convert WeakMapPrototype functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
WeakMapPrototype.h LibJS: Convert WeakMapPrototype functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
WeakRef.cpp LibJS: Make WeakContainer pruning do less work 2021-10-05 18:52:00 +02:00
WeakRef.h LibJS: Make WeakContainer pruning do less work 2021-10-05 18:52:00 +02:00
WeakRefConstructor.cpp LibJS: Convert NativeFunction::{call,construct}() to ThrowCompletionOr 2021-10-21 09:02:23 +01:00
WeakRefConstructor.h LibJS: Convert NativeFunction::{call,construct}() to ThrowCompletionOr 2021-10-21 09:02:23 +01:00
WeakRefPrototype.cpp LibJS: Convert WeakRefPrototype functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
WeakRefPrototype.h LibJS: Convert WeakRefPrototype functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
WeakSet.cpp LibJS: Make WeakContainer pruning do less work 2021-10-05 18:52:00 +02:00
WeakSet.h LibJS: Make WeakContainer pruning do less work 2021-10-05 18:52:00 +02:00
WeakSetConstructor.cpp LibJS: Convert NativeFunction::{call,construct}() to ThrowCompletionOr 2021-10-21 09:02:23 +01:00
WeakSetConstructor.h LibJS: Convert NativeFunction::{call,construct}() to ThrowCompletionOr 2021-10-21 09:02:23 +01:00
WeakSetPrototype.cpp LibJS: Convert WeakSetPrototype functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
WeakSetPrototype.h LibJS: Convert WeakSetPrototype functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
WrappedFunction.cpp LibJS: Implement Wrapped Function Exotic Objects 2021-10-14 00:41:41 +01:00
WrappedFunction.h LibJS: Implement Wrapped Function Exotic Objects 2021-10-14 00:41:41 +01:00