Fix build

This commit is contained in:
Jarred Sumner
2026-02-11 20:25:29 -08:00
parent a1cf1e8bbf
commit 99ebc3aa5c
2 changed files with 15 additions and 9 deletions

View File

@@ -546,6 +546,7 @@ set(BUN_OBJECT_LUT_SOURCES
${CWD}/src/bun.js/bindings/ProcessBindingHTTPParser.cpp
${CWD}/src/bun.js/modules/NodeModuleModule.cpp
${CODEGEN_PATH}/ZigGeneratedClasses.lut.txt
${CWD}/src/bun.js/bindings/webcore/JSEvent.cpp
)
set(BUN_OBJECT_LUT_OUTPUTS
@@ -560,6 +561,7 @@ set(BUN_OBJECT_LUT_OUTPUTS
${CODEGEN_PATH}/ProcessBindingHTTPParser.lut.h
${CODEGEN_PATH}/NodeModuleModule.lut.h
${CODEGEN_PATH}/ZigGeneratedClasses.lut.h
${CODEGEN_PATH}/JSEvent.lut.h
)
macro(WEBKIT_ADD_SOURCE_DEPENDENCIES _source _deps)
@@ -593,6 +595,7 @@ foreach(i RANGE 0 ${BUN_OBJECT_LUT_SOURCES_MAX_INDEX})
"Generating ${filename}.lut.h"
DEPENDS
${BUN_OBJECT_LUT_SOURCE}
${CWD}/src/codegen/create_hash_table
COMMAND
${BUN_EXECUTABLE}
${BUN_FLAGS}
@@ -602,6 +605,7 @@ foreach(i RANGE 0 ${BUN_OBJECT_LUT_SOURCES_MAX_INDEX})
${BUN_OBJECT_LUT_OUTPUT}
SOURCES
${BUN_OBJECT_LUT_SCRIPT}
${CWD}/src/codegen/create_hash_table
${BUN_OBJECT_LUT_SOURCE}
OUTPUTS
${BUN_OBJECT_LUT_OUTPUT}

View File

@@ -122,16 +122,18 @@ STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSEventPrototype, JSEventPrototype::Base);
using JSEventDOMConstructor = JSDOMConstructor<JSEvent>;
/* Hash table */
/* Source for JSEvent.lut.h
@begin JSEventTable
isTrusted jsEvent_isTrusted DontDelete|ReadOnly|CustomAccessor|DOMAttribute
@end
*/
static const struct CompactHashIndex JSEventTableIndex[2] = {
{ 0, -1 },
{ -1, -1 },
};
static const HashTableValue JSEventTableValues[] = {
{ "isTrusted"_s, static_cast<unsigned>(JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { HashTableValue::GetterSetterType, jsEvent_isTrusted, 0 } },
};
// The generated .lut.h defines JSEventTable with nullptr for classForThis,
// but DOMAttribute properties require it for type checking. Rename the
// generated table and redefine it with the correct classForThis.
#define JSEventTable JSEventTable_GENERATED
#include "JSEvent.lut.h"
#undef JSEventTable
static const HashTable JSEventTable = { 1, 1, true, JSEvent::info(), JSEventTableValues, JSEventTableIndex };
/* Hash table for constructor */