joanvilarrasa
6f3b38de0f
LibWeb: Emit XMLHttpRequest timeout event when the request times out
...
Push notes / build (push) Waiting to run
CI / macOS, arm64, Sanitizer, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer, Clang (push) Waiting to run
Package the js repl as a binary artifact / Linux, arm64 (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / Linux, x86_64 (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Build Dev Container Image / build (push) Has been cancelled
When an XMLHttpRequest times out, we now emit a timeout event
2025-08-27 14:15:48 +02:00
Kenneth Myhra
4963dea504
LibWeb/XHR: Remove outdated FIXME about Streams not integrated in XHR
...
CI / macOS, arm64, Sanitizer, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer, Clang (push) Waiting to run
Package the js repl as a binary artifact / Linux, arm64 (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / Linux, x86_64 (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
Streams were integrated into XHR::send() in: https://github.com/SerenityOS/serenity/pull/24132
2025-08-26 07:18:49 -04:00
Kenneth Myhra
5d94119f4c
LibWeb/XHR: Add missing spec comment for step 12 in XHR::send()
2025-08-26 07:18:49 -04:00
Kenneth Myhra
e6a3307955
LibWeb/XHR: Remove outdated FIXMEs about propagating errors
...
The methods these FIXMEs refer to is no longer fallible.
2025-08-26 07:18:49 -04:00
Kenneth Myhra
2b832fdc31
LibWeb/XHR: MUST handle_{errors,response_end_of_body} in async context
...
These cannot throw in an async context and we no longer care about minor
OOM errors so let's MUST these.
2025-08-26 07:18:49 -04:00
Timothy Flynn
70db474cf0
LibJS+LibWeb: Port interned bytecode strings to UTF-16
...
This was almost a no-op, except we intern JS exception messages. So the
bulk of this patch is porting exception messages to UTF-16.
2025-08-14 10:27:08 +02:00
Shannon Booth
79293a3cbc
LibWeb/XHR: Don't construct a String from a String
...
CI / macOS, arm64, Sanitizer, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer, Clang (push) Waiting to run
Package the js repl as a binary artifact / Linux, arm64 (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / Linux, x86_64 (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
Serializing a URL already returns a String.
2025-07-12 02:57:36 +01:00
Shannon Booth
579730d861
LibWeb: Prefer using equals_ignoring_ascii_case
...
Which has an optmization if both size of the string being passed
through are FlyStrings, which actually ends up being the case
in some places during selector matching comparing attribute names.
Instead of maintaining more overloads of
Infra::is_ascii_case_insensitive_match, switch
everything over to equals_ignoring_ascii_case instead.
2025-05-21 13:45:02 +01:00
Andreas Kling
a6dfc74e93
LibWeb: Only set prototype once for object with IDL interface
...
Before this change, we were going through the chain of base classes for
each IDL interface object and having them set the prototype to their
prototype.
Instead of doing that, reorder things so that we set the right prototype
immediately in Foo::initialize(), and then don't bother in all the base
class overrides.
This knocks off a ~1% profile item on Speedometer 3.
2025-04-20 18:43:11 +02:00
Vishal Biswas
d56f6805d3
LibWeb: Mimic if-condition from spec
...
https://xhr.spec.whatwg.org/#dom-xmlhttprequest-abort
2025-04-17 08:28:47 -04:00
Shannon Booth
a5df972055
LibWeb: Do not store network errors as a StringView
...
CI / Lagom (arm64, Sanitizer_CI, false, macos-15, macOS, Clang) (push) Waiting to run
CI / Lagom (x86_64, Fuzzers_CI, false, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, false, ubuntu-24.04, Linux, GNU) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, true, ubuntu-24.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (arm64, macos-15, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (x86_64, ubuntu-24.04, Linux, Linux-x86_64) (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
This is very clearly a very dangerous API to have, and was causing
a crash on Linux as a result of a stack use-after-free when visiting
https://www.index.hr/ .
Fixes #3901
2025-04-02 11:43:53 +02:00
Luke Wilde
6d1f78198d
LibWeb: Implement Resource Timing
2025-03-06 09:00:53 -07:00
Sam Atkins
f148af0a93
LibWeb: Move XMLSerializer into HTML directory
...
The DOMParsing spec is in the process of being merged into the HTML one,
gradually. The linked spec change moves XMLSerializer, but many of the
algorithms are still in the DOMParsing spec so I've left the links to
those alone.
I've done my best to update the GN build but since I'm not actually
using it, I might have done that wrong.
Corresponds to 2edb8cc7ee
2025-03-04 16:44:41 +00:00
Aliaksandr Kalenik
184ae687c5
LibWeb+WebContent: Remove unused code in BrowsingContext
2025-02-17 19:11:14 -05:00
David Hewitt
be3e221b3f
LibWeb/XHR: Ensure type set on blob responses
2025-02-16 19:08:45 +00:00
Shannon Booth
fd27eef0d1
LibWeb: Return OptionalNone from DOMURL::parse on failure
...
This ports one more function away from needing to use the awkward
valid state of the URL class.
2025-01-22 12:33:55 +00:00
Timothy Flynn
85b424464a
AK+Everywhere: Rename verify_cast
to as
...
Follow-up to fc20e61e72
.
2025-01-21 11:34:06 -05:00
Shannon Booth
e74ca82083
LibWeb/XHR: Isomorphic decode accessing XMLHttpRequest response headers
...
Fixes a crash on:
https://wpt.live/html/browsers/browsing-the-web/navigating-across-documents/refresh/subresource.any.html
2025-01-15 12:35:56 +00:00
Shannon Booth
ee1b2dced3
LibWeb/XHR: Use HTML EventLoop to wait for response to arrive
2025-01-03 10:59:20 +01:00
Andrew Kaster
6ed2bf2bb1
LibWeb: Mark local variables captured in GC functions as ignored
...
These variables are all captured in queued events or other event loop
tasks, but are all guarded by event loop spins later in the function.
The IGNORE_USE_IN_ESCAPING_LAMBDA will soon be required for all locals
that are captured by ref in GC::Function as well as AK::Function.
2024-12-10 07:13:00 +01:00
Timothy Flynn
953fe75271
LibWeb: Remove exception handling from safely extracting response bodies
...
The entire purpose of this AO is to avoid handling exceptions, which we
can do now that the underlying AOs do not throw exceptions on OOM.
2024-12-09 20:02:51 -07:00
Sam Atkins
90e763de4c
LibURL: Replace Host's Empty state with making Url's Host optional
...
A couple of reasons:
- Origin's Host (when in the tuple state) can't be null
- There's an "empty host" concept in the spec which is NOT the same as a
null Host, and that was confusing me.
2024-11-30 12:07:39 +01:00
rmg-x
84f673515b
LibWeb/XHR: Use normalized header value when validating contents
...
This was not matching specification and caused valid requests to be
rejected.
2024-11-21 00:26:58 +00:00
Shannon Booth
f87041bf3a
LibGC+Everywhere: Factor out a LibGC from LibJS
...
Resulting in a massive rename across almost everywhere! Alongside the
namespace change, we now have the following names:
* JS::NonnullGCPtr -> GC::Ref
* JS::GCPtr -> GC::Ptr
* JS::HeapFunction -> GC::Function
* JS::CellImpl -> GC::Cell
* JS::Handle -> GC::Root
2024-11-15 14:49:20 +01:00
Shannon Booth
9b79a686eb
LibJS+LibWeb: Use realm.create<T> instead of heap.allocate<T>
...
The main motivation behind this is to remove JS specifics of the Realm
from the implementation of the Heap.
As a side effect of this change, this is a bit nicer to read than the
previous approach, and in my opinion, also makes it a little more clear
that this method is specific to a JavaScript Realm.
2024-11-13 16:51:44 -05:00
Timothy Flynn
93712b24bf
Everywhere: Hoist the Libraries folder to the top-level
2024-11-10 12:50:45 +01:00