LibWeb: Make DOMException GC-allocated

This commit is contained in:
Andreas Kling 2022-09-04 16:56:15 +02:00
commit 497ead37bc
Notes: sideshowbarker 2024-07-17 23:07:41 +09:00
58 changed files with 307 additions and 278 deletions

View file

@ -65,7 +65,7 @@ DOM::ExceptionOr<JS::NonnullGCPtr<Worker>> Worker::create(FlyString const& scrip
// 4. If this fails, throw a "SyntaxError" DOMException.
if (!url.is_valid()) {
dbgln_if(WEB_WORKER_DEBUG, "WebWorker: Invalid URL loaded '{}'.", script_url);
return DOM::SyntaxError::create("url is not valid");
return DOM::SyntaxError::create(document.global_object(), "url is not valid");
}
// 5. Let worker URL be the resulting URL record.