Update src/bun.js/bindings/webcore/JSEventEmitter.cpp

Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
This commit is contained in:
snwy
2024-12-05 16:51:23 -08:00
committed by GitHub
parent 08fe4945f9
commit c54551e2ed

View File

@@ -148,7 +148,7 @@ template<> JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES JSEventEmitterDOMConstru
if constexpr (IsExceptionOr<decltype(object)>) {
RETURN_IF_EXCEPTION(throwScope, {});
}
Structure* structure = JSEventEmitter::createStructure(vm, lexicalGlobalObject, jsValue);
Structure* structure = getDOMStructure<JSEventEmitter>(vm, globalObject)
JSEventEmitter* instance = JSEventEmitter::create(structure, reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject), object.copyRef());
RETURN_IF_EXCEPTION(throwScope, {});
RELEASE_AND_RETURN(throwScope, JSValue::encode(instance));