1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 02:27:43 +00:00

LibWeb: Make DOMException GC-allocated

This commit is contained in:
Andreas Kling 2022-09-04 16:56:15 +02:00
parent 0e47754ac8
commit 497ead37bc
58 changed files with 307 additions and 278 deletions

View file

@ -9,7 +9,6 @@
#include <AK/Optional.h>
#include <AK/StdLibExtras.h>
#include <LibJS/Runtime/VM.h>
#include <LibWeb/Bindings/DOMExceptionWrapper.h>
#include <LibWeb/DOM/ExceptionOr.h>
namespace Web::Bindings {
@ -74,8 +73,8 @@ ALWAYS_INLINE JS::Completion dom_exception_to_throw_completion(auto&& vm, auto&&
VERIFY_NOT_REACHED();
}
},
[&](NonnullRefPtr<DOM::DOMException> exception) {
return vm.template throw_completion<DOMExceptionWrapper>(move(exception));
[&](JS::NonnullGCPtr<DOM::DOMException> const& exception) {
return throw_completion(exception);
});
}