diff options
author | Timothy Flynn <trflynn89@pm.me> | 2023-02-16 12:55:22 -0500 |
---|---|---|
committer | Tim Flynn <trflynn89@pm.me> | 2023-02-17 09:14:23 -0500 |
commit | 4d10911f96eb6ad55a9798b7237a60407f645e91 (patch) | |
tree | 08ff30edf026fd06a1c68290d87ee928db96a72c /Userland/Libraries/LibWeb/HTML/Origin.h | |
parent | 93ad25fbe51d39094ea42eb9dd62b0d7203a4d5f (diff) | |
download | serenity-4d10911f96eb6ad55a9798b7237a60407f645e91.zip |
LibJS: Pre-allocate the out-of-memory error string on the VM
If we are out of memory, we can't try to allocate a string that could
fail as well. When Error is converted to String, this would result in an
endless OOM-throwing loop. Instead, pre-allocate the string on the VM,
and use it to construct the Error.
Note that as of this commit, the OOM string is still a DeprecatedString.
This is just preporatory for Error's conversion to String.
Diffstat (limited to 'Userland/Libraries/LibWeb/HTML/Origin.h')
0 files changed, 0 insertions, 0 deletions