remove jsc.createCallback (#24910)

### What does this PR do?
This was creating `Zig::FFIFunction` when we could instead use a plain
`JSC::JSFunction`
### How did you verify your code works?
Added a test
This commit is contained in:
Dylan Conway
2025-11-20 20:56:02 -08:00
committed by GitHub
parent a0c5edb15b
commit 274e01c737
29 changed files with 88 additions and 172 deletions

View File

@@ -74,3 +74,15 @@ it(`Bun.hash.rapidhash()`, () => {
gcTick();
expect(Bun.hash.rapidhash(new TextEncoder().encode("hello world"))).toBe(0x58a89bdcee89c08cn);
});
it("does not crash when changing Int32Array constructor with Bun.hash.xxHash32 as species", () => {
const arr = new Int32Array();
function foo(a4) {
return a4;
}
foo[Symbol.species] = Bun.hash.xxHash32;
arr.constructor = foo;
expect(() => {
arr.map(Bun.hash.xxHash32);
}).toThrow("species is not a constructor");
});