mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-30 23:12:56 +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. |
||
---|---|---|
.. | ||
Checks.cpp | ||
Checks.h | ||
Fetching.cpp | ||
Fetching.h | ||
PendingResponse.cpp | ||
PendingResponse.h | ||
RefCountedFlag.cpp | ||
RefCountedFlag.h |