mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-02-04 06:23:45 +00:00
Merge pull request #1380 from lightpanda-io/static_accessor_fix
Fix static accessors
This commit is contained in:
@@ -720,10 +720,17 @@ pub const Accessor = struct {
|
|||||||
defer caller.deinit();
|
defer caller.deinit();
|
||||||
|
|
||||||
const info = FunctionCallbackInfo{ .handle = handle.? };
|
const info = FunctionCallbackInfo{ .handle = handle.? };
|
||||||
caller.method(T, getter, info, .{
|
if (comptime opts.static) {
|
||||||
.as_typed_array = opts.as_typed_array,
|
caller.function(T, getter, info, .{
|
||||||
.null_as_undefined = opts.null_as_undefined,
|
.as_typed_array = opts.as_typed_array,
|
||||||
});
|
.null_as_undefined = opts.null_as_undefined,
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
caller.method(T, getter, info, .{
|
||||||
|
.as_typed_array = opts.as_typed_array,
|
||||||
|
.null_as_undefined = opts.null_as_undefined,
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}.wrap;
|
}.wrap;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,6 +37,7 @@
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
<script id="microtask_access_to_list">
|
<script id="microtask_access_to_list">
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -64,3 +65,7 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
testing.expectEqual(['mark', 'measure'], PerformanceObserver.supportedEntryTypes);
|
||||||
|
</script>
|
||||||
|
|||||||
@@ -133,7 +133,7 @@ pub fn takeRecords(self: *PerformanceObserver, page: *Page) ![]*Performance.Entr
|
|||||||
return records;
|
return records;
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn getSupportedEntryTypes(_: *const PerformanceObserver) []const []const u8 {
|
pub fn getSupportedEntryTypes() []const []const u8 {
|
||||||
return &.{ "mark", "measure" };
|
return &.{ "mark", "measure" };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user