LibWeb/WebIDL: Upgrade QuotaExceededError to its own interface

See 48eba6d
This commit is contained in:
Shannon Booth 2025-12-26 14:36:14 +01:00 committed by Shannon Booth
parent c12f21498c
commit 2a8b83a568
Notes: github-actions[bot] 2025-12-29 16:16:14 +00:00
17 changed files with 437 additions and 20 deletions

View file

@ -10,6 +10,7 @@
#include <LibWeb/HTML/Scripting/ModuleScript.h>
#include <LibWeb/WebIDL/DOMException.h>
#include <LibWeb/WebIDL/ExceptionOr.h>
#include <LibWeb/WebIDL/QuotaExceededError.h>
namespace Web::HTML {
@ -116,7 +117,7 @@ JS::Promise* JavaScriptModuleScript::run(PreventErrorReporting)
// then set evaluationPromise to a promise rejected with a new "QuotaExceededError" DOMException.
if (elevation_promise_or_error.is_error()) {
auto promise = JS::Promise::create(realm);
promise->reject(WebIDL::QuotaExceededError::create(realm, "Failed to evaluate module script"_utf16).ptr());
promise->reject(WebIDL::QuotaExceededError::create(realm, "Failed to evaluate module script"_utf16));
evaluation_promise = promise;
} else {