mirror of
https://github.com/oven-sh/bun
synced 2026-02-02 15:08:46 +00:00
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:
@@ -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");
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user