1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:28:12 +00:00
serenity/Userland/Libraries/LibWeb
Linus Groh 25909dcc05 LibWeb: Prepare to run callback in host_enqueue_promise_job()
...and clean up afterwards, of course. Additionally to preparing to run
a script, we also prepare to run a callback here. This matches WebIDL's
invoke_callback() / call_user_object_operation() functions, and prevents
a crash in host_make_job_callback() when getting the incumbent settings
object.

Running the following JS no longer crashes after this change:

```js
new Promise((resolve) => {
    setTimeout(resolve, 0);
}).then(() => {
    return Promise.reject();
});
```

See further discussion/investigation here:
9950196472
1026824624
1026922985

Many thanks to Luke for doing the hard work here, tracking this down,
and suggesting the fix!

Co-authored-by: Luke Wilde <lukew@serenityos.org>
2022-10-05 09:12:59 +01:00
..
Bindings LibWeb: Prepare to run callback in host_enqueue_promise_job() 2022-10-05 09:12:59 +01:00
Cookie Everywhere: Add sv suffix to strings relying on StringView(char const*) 2022-07-12 23:11:35 +02:00
Crypto LibWeb: Remove unecessary dependence on Window from assorted classes 2022-10-01 21:05:32 +01:00
CSS LibWeb: Avoid a bunch of unnecessary copying in CSS::ComputedValues 2022-10-04 21:30:58 +02:00
DOM LibWeb: Implement a simple version of Element.scrollIntoView() 2022-10-04 21:46:56 +02:00
DOMParsing LibWeb: Remove unecessary dependence on Window from DOM and WebIDL 2022-10-01 21:05:32 +01:00
Encoding LibWeb: Remove unecessary dependence on Window from assorted classes 2022-10-01 21:05:32 +01:00
Fetch LibJS: Make PromiseCapability GC-allocated 2022-10-02 23:02:27 +01:00
FileAPI LibWeb: Add FileList from the FileAPI spec 2022-10-04 22:05:14 +02:00
Geometry LibWeb: Cleanup unecessary uses and includes of HTML::Window 2022-10-01 21:05:32 +01:00
HighResolutionTime LibWeb: Remove unecessary dependence on Window from assorted classes 2022-10-01 21:05:32 +01:00
HTML LibWeb: Implement <input type=file> behavior 2022-10-04 22:05:14 +02:00
Infra LibWeb: Run 'UTF-8 decode' in parse_json_bytes_to_javascript_value() 2022-10-04 20:05:09 +01:00
IntersectionObserver LibWeb: Remove unecessary dependence on Window from assorted classes 2022-10-01 21:05:32 +01:00
Layout LibWeb: Let FFC parent context "handle" sizing of child FFC container 2022-10-04 21:30:58 +02:00
Loader LibWeb: Identify as "Ladybird" instead of "Browser" 2022-10-04 15:27:04 +02:00
MimeSniff LibWeb: In MimeType serialization, put just one \ in front of each " 2022-09-27 15:47:54 +01:00
NavigationTiming LibWeb: Remove unecessary dependence on Window from assorted classes 2022-10-01 21:05:32 +01:00
Page LibWeb: Implement <input type=file> behavior 2022-10-04 22:05:14 +02:00
Painting LibWeb: Support painting the hue-rotate() filter effect 2022-10-02 21:17:41 +02:00
Platform LibWeb+WebContent: Move Serenity EventLoop and Font plugins into LibWeb 2022-09-21 20:42:36 +01:00
ReferrerPolicy LibWeb: Add referrer policy to Fetch::Infrastructure::Request 2022-09-27 14:56:17 +01:00
RequestIdleCallback LibWeb: Remove unecessary dependence on Window from assorted classes 2022-10-01 21:05:32 +01:00
ResizeObserver LibWeb: Remove unecessary dependence on Window from assorted classes 2022-10-01 21:05:32 +01:00
Scripts Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
Selection LibWeb: Remove unecessary dependence on Window from assorted classes 2022-10-01 21:05:32 +01:00
Streams LibWeb: Fix ReadableStream's WEB_PLATFORM_OBJECT() class name 2022-10-04 20:05:09 +01:00
SVG LibWeb: Cleanup unecessary uses and includes of HTML::Window 2022-10-01 21:05:32 +01:00
Tests Everywhere: Rename WrapperGenerator to BindingsGenerator 2022-09-21 23:06:08 +01:00
UIEvents LibWeb: Cleanup unecessary uses and includes of HTML::Window 2022-10-01 21:05:32 +01:00
URL LibWeb: Remove unecessary dependence on Window from assorted classes 2022-10-01 21:05:32 +01:00
WebAssembly LibWeb: Cleanup unecessary uses and includes of HTML::Window 2022-10-01 21:05:32 +01:00
WebGL LibWeb: Remove unecessary dependence on Window from WebGL and WebSocket 2022-10-01 21:05:32 +01:00
WebIDL LibJS: Make PromiseCapability GC-allocated 2022-10-02 23:02:27 +01:00
WebSockets LibWeb: Remove unecessary dependence on Window from WebGL and WebSocket 2022-10-01 21:05:32 +01:00
XHR LibWeb: Remove redundant JS::Value() calls in XMLHttpRequest::response() 2022-10-04 20:05:09 +01:00
XML LibWeb: Remove unecessary dependence on Window from assorted classes 2022-10-01 21:05:32 +01:00
CMakeLists.txt LibWeb: Add FileList from the FileAPI spec 2022-10-04 22:05:14 +02:00
Dump.cpp LibWeb: Cache lowercased names in SimpleSelector 2022-09-15 16:16:56 +02:00
Dump.h LibWeb: Implement initial CSSFontFaceRule and FontFace classes 2022-03-28 22:25:25 +02:00
FontCache.cpp LibGfx: Move other font-related files to LibGfx/Font/ 2022-04-09 23:48:18 +02:00
FontCache.h LibGfx: Move other font-related files to LibGfx/Font/ 2022-04-09 23:48:18 +02:00
Forward.h LibWeb: Move Web prototypes and constructors to new Intrinsics object 2022-10-01 21:05:32 +01:00
idl_files.cmake LibWeb: Add FileList from the FileAPI spec 2022-10-04 22:05:14 +02:00
Namespace.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Namespace.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
TreeNode.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00