mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-28 14:02:51 +00:00
Fetched bodies can be on the order of gigabytes, so rather than crashing when we hit OOM here, we can simply invoke the error callback with a DOM exception. We use "UnknownError" here as the spec directly supports this for OOM errors: UnknownError: The operation failed for an unknown transient reason (e.g. out of memory). This is still an ad-hoc implementation. We should be using streams, and we do have the AOs available to do so. But they need to be massaged to be compatible with callers of Body::fully_read. And once we do use streams, this function will become infallible - so making it infallible here is at least a step in the right direction. |
||
---|---|---|
.. | ||
Bodies.cpp | ||
Bodies.h | ||
Headers.cpp | ||
Headers.h | ||
Methods.cpp | ||
Methods.h | ||
Requests.cpp | ||
Requests.h | ||
Responses.cpp | ||
Responses.h | ||
Statuses.cpp | ||
Statuses.h |