From 503154c1b341e655f2880e453ec8b15a421da522 Mon Sep 17 00:00:00 2001 From: snwy Date: Thu, 5 Dec 2024 17:00:12 -0800 Subject: [PATCH] undo suggestion --- src/bun.js/bindings/webcore/JSEventEmitter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bun.js/bindings/webcore/JSEventEmitter.cpp b/src/bun.js/bindings/webcore/JSEventEmitter.cpp index 5e877c7383..e095ec5175 100644 --- a/src/bun.js/bindings/webcore/JSEventEmitter.cpp +++ b/src/bun.js/bindings/webcore/JSEventEmitter.cpp @@ -148,8 +148,8 @@ template<> JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES JSEventEmitterDOMConstru if constexpr (IsExceptionOr) { RETURN_IF_EXCEPTION(throwScope, {}); } - Structure* structure = getDOMStructure(vm, globalObject) - JSEventEmitter* instance + Structure* structure = JSEventEmitter::createStructure(vm, lexicalGlobalObject, jsValue); + JSEventEmitter* instance = JSEventEmitter::create(structure, reinterpret_cast(lexicalGlobalObject), object.copyRef()); RETURN_IF_EXCEPTION(throwScope, {}); RELEASE_AND_RETURN(throwScope, JSValue::encode(instance));