@@ -2199,11 +2199,6 @@ pub fn Env(comptime State: type, comptime WebApis: type) type {
21992199
22002200 fn generateNamedIndexer (comptime Struct : type , template_proto : v8.ObjectTemplate ) void {
22012201 if (@hasDecl (Struct , "named_get" ) == false ) {
2202- if (comptime builtin .mode == .Debug ) {
2203- if (log .enabled (.unknown_prop , .debug )) {
2204- generateDebugNamedIndexer (Struct , template_proto );
2205- }
2206- }
22072202 return ;
22082203 }
22092204
@@ -2263,31 +2258,6 @@ pub fn Env(comptime State: type, comptime WebApis: type) type {
22632258 template_proto .setNamedProperty (configuration , null );
22642259 }
22652260
2266- fn generateDebugNamedIndexer (comptime Struct : type , template_proto : v8.ObjectTemplate ) void {
2267- const configuration = v8.NamedPropertyHandlerConfiguration {
2268- .getter = struct {
2269- fn callback (c_name : ? * const v8.C_Name , raw_info : ? * const v8.C_PropertyCallbackInfo ) callconv (.c ) u8 {
2270- const info = v8 .PropertyCallbackInfo .initFromV8 (raw_info );
2271- const isolate = info .getIsolate ();
2272- const v8_context = isolate .getCurrentContext ();
2273-
2274- const js_context : * JsContext = @ptrFromInt (v8_context .getEmbedderData (1 ).castTo (v8 .BigInt ).getUint64 ());
2275-
2276- const property = valueToString (js_context .call_arena , .{ .handle = c_name .? }, isolate , v8_context ) catch "???" ;
2277- log .debug (.unknown_prop , "unkown property" , .{ .@"struct" = @typeName (Struct ), .property = property });
2278- return v8 .Intercepted .No ;
2279- }
2280- }.callback ,
2281-
2282- // This is really cool. Without this, we'd intercept _all_ properties
2283- // even those explicitly set. So, node.length for example would get routed
2284- // to our `named_get`, rather than a `get_length`. This might be
2285- // useful if we run into a type that we can't model properly in Zig.
2286- .flags = v8 .PropertyHandlerFlags .OnlyInterceptStrings | v8 .PropertyHandlerFlags .NonMasking ,
2287- };
2288- template_proto .setNamedProperty (configuration , null );
2289- }
2290-
22912261 fn generateUndetectable (comptime Struct : type , template : v8.ObjectTemplate ) void {
22922262 const has_js_call_as_function = @hasDecl (Struct , "jsCallAsFunction" );
22932263
0 commit comments