aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js/base.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/bun.js/base.zig')
-rw-r--r--src/bun.js/base.zig41
1 files changed, 3 insertions, 38 deletions
diff --git a/src/bun.js/base.zig b/src/bun.js/base.zig
index d8a758dc2..2bac8bf45 100644
--- a/src/bun.js/base.zig
+++ b/src/bun.js/base.zig
@@ -2175,16 +2175,9 @@ const SHA512_256 = JSC.API.Bun.Crypto.SHA512_256;
const MD5_SHA1 = JSC.API.Bun.Crypto.MD5_SHA1;
const FFI = JSC.FFI;
pub const JSPrivateDataPtr = TaggedPointerUnion(.{
- AttributeIterator,
- Comment,
DebugServer,
DebugSSLServer,
- DocEnd,
- DocType,
- Element,
- EndTag,
FetchEvent,
- HTMLRewriter,
JSNode,
LazyPropertiesObject,
@@ -2193,7 +2186,6 @@ pub const JSPrivateDataPtr = TaggedPointerUnion(.{
Server,
SSLServer,
- TextChunk,
FFI,
});
@@ -2244,25 +2236,6 @@ pub fn getterWrap(comptime Container: type, comptime name: string) GetterType(Co
}.callback;
}
-pub fn setterWrap(comptime Container: type, comptime name: string) SetterType(Container) {
- return struct {
- const FunctionType = @TypeOf(@field(Container, name));
- const FunctionTypeInfo: std.builtin.Type.Fn = @typeInfo(FunctionType).Fn;
-
- pub fn callback(
- this: *Container,
- ctx: js.JSContextRef,
- _: js.JSObjectRef,
- _: js.JSStringRef,
- value: js.JSValueRef,
- exception: js.ExceptionRef,
- ) bool {
- @call(.auto, @field(Container, name), .{ this, JSC.JSValue.fromRef(value), exception, ctx.ptr() });
- return exception.* == null;
- }
- }.callback;
-}
-
fn GetterType(comptime Container: type) type {
return fn (
this: *Container,
@@ -2273,17 +2246,6 @@ fn GetterType(comptime Container: type) type {
) js.JSObjectRef;
}
-fn SetterType(comptime Container: type) type {
- return fn (
- this: *Container,
- ctx: js.JSContextRef,
- obj: js.JSObjectRef,
- prop: js.JSStringRef,
- value: js.JSValueRef,
- exception: js.ExceptionRef,
- ) bool;
-}
-
fn MethodType(comptime Container: type, comptime has_container: bool) type {
return fn (
this: if (has_container) *Container else void,
@@ -2918,6 +2880,9 @@ pub fn wrapInstanceMethod(
*JSC.JSGlobalObject => {
args[i] = globalThis.ptr();
},
+ *JSC.CallFrame => {
+ args[i] = callframe;
+ },
JSC.Node.StringOrBuffer => {
const arg = iter.nextEat() orelse {
globalThis.throwInvalidArguments("expected string or buffer", .{});