node: fix Buffer.from(arrayBuffer) (#17267)

This commit is contained in:
Meghan Denny
2025-02-11 18:10:43 -08:00
committed by GitHub
parent 0b6d468b74
commit bdccbbc828
2 changed files with 29 additions and 1 deletions

View File

@@ -2281,7 +2281,7 @@ JSC_DEFINE_HOST_FUNCTION(Zig::jsFunctionInherits, (JSC::JSGlobalObject * globalO
switch (id) {
${jsclasses
.map(v => v[0])
.map((v, i) => ` case ${i}: return JSValue::encode(jsBoolean(cell->inherits<WebCore::JS${v}>()));`)
.map((v, i) => ` case ${i}: return JSValue::encode(jsBoolean(jsDynamicCast<WebCore::JS${v}*>(cell) != nullptr));`)
.join("\n")}
}
return JSValue::encode(jsBoolean(false));