no usingnamespace, organize jsc namespace, enable -fincremental (#19122)

Co-authored-by: Dylan Conway <35280289+dylan-conway@users.noreply.github.com>
This commit is contained in:
chloe caruso
2025-04-22 16:34:15 -07:00
committed by GitHub
parent 842fe8664e
commit 3349c995b5
271 changed files with 30131 additions and 30868 deletions

View File

@@ -7,6 +7,7 @@ const Output = bun.Output;
const ZigString = JSC.ZigString;
const validators = @import("./util/validators.zig");
const debug = bun.Output.scoped(.zlib, true);
const Buffer = bun.api.node.Buffer;
pub fn crc32(globalThis: *JSC.JSGlobalObject, callframe: *JSC.CallFrame) bun.JSError!JSC.JSValue {
const arguments = callframe.arguments_old(2).ptr;
@@ -20,7 +21,7 @@ pub fn crc32(globalThis: *JSC.JSGlobalObject, callframe: *JSC.CallFrame) bun.JSE
if (data.isString()) {
break :blk data.asString().toSlice(globalThis, bun.default_allocator);
}
const buffer: JSC.Buffer = JSC.Buffer.fromJS(globalThis, data) orelse {
const buffer: Buffer = Buffer.fromJS(globalThis, data) orelse {
const ty_str = data.jsTypeString(globalThis).toSlice(globalThis, bun.default_allocator);
defer ty_str.deinit();
return globalThis.ERR(.INVALID_ARG_TYPE, "The \"data\" property must be an instance of Buffer, TypedArray, DataView, or ArrayBuffer. Received {s}", .{ty_str.slice()}).throw();