From 875ca2fb688ab2d1503020d7526163294fcbf8c2 Mon Sep 17 00:00:00 2001 From: Luke Wilde Date: Fri, 9 Sep 2022 19:30:45 +0100 Subject: [PATCH] LibWeb: Set prototype for both TextDecoder and AbortSignal These were forgotten to be set during the GC heap conversion. --- Userland/Libraries/LibWeb/DOM/AbortSignal.cpp | 1 + Userland/Libraries/LibWeb/Encoding/TextDecoder.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/Userland/Libraries/LibWeb/DOM/AbortSignal.cpp b/Userland/Libraries/LibWeb/DOM/AbortSignal.cpp index d76e5b989d..604242fe49 100644 --- a/Userland/Libraries/LibWeb/DOM/AbortSignal.cpp +++ b/Userland/Libraries/LibWeb/DOM/AbortSignal.cpp @@ -19,6 +19,7 @@ JS::NonnullGCPtr AbortSignal::create_with_global_object(HTML::Windo AbortSignal::AbortSignal(HTML::Window& window) : EventTarget(window.realm()) { + set_prototype(&window.cached_web_prototype("AbortSignal")); } // https://dom.spec.whatwg.org/#abortsignal-add diff --git a/Userland/Libraries/LibWeb/Encoding/TextDecoder.cpp b/Userland/Libraries/LibWeb/Encoding/TextDecoder.cpp index 5e6435e7ec..1379455374 100644 --- a/Userland/Libraries/LibWeb/Encoding/TextDecoder.cpp +++ b/Userland/Libraries/LibWeb/Encoding/TextDecoder.cpp @@ -29,6 +29,7 @@ TextDecoder::TextDecoder(HTML::Window& window, TextCodec::Decoder& decoder, FlyS , m_fatal(fatal) , m_ignore_bom(ignore_bom) { + set_prototype(&window.cached_web_prototype("TextDecoder")); } TextDecoder::~TextDecoder() = default;