mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-29 23:23:28 +00:00
Merge pull request #805 from lightpanda-io/performance-mark
add PerformanceEntry and PerformanceMark
This commit is contained in:
@@ -2215,7 +2215,7 @@ pub fn Env(comptime State: type, comptime WebApis: type) type {
|
||||
|
||||
const T = @TypeOf(value);
|
||||
switch (@typeInfo(T)) {
|
||||
.void, .bool, .int, .comptime_int, .float, .comptime_float => {
|
||||
.void, .bool, .int, .comptime_int, .float, .comptime_float, .@"enum" => {
|
||||
// Need to do this to keep the compiler happy
|
||||
// simpleZigValueToJs handles all of these cases.
|
||||
unreachable;
|
||||
@@ -3098,6 +3098,12 @@ fn simpleZigValueToJs(isolate: v8.Isolate, value: anytype, comptime fail: bool)
|
||||
}
|
||||
},
|
||||
.@"union" => return simpleZigValueToJs(isolate, std.meta.activeTag(value), fail),
|
||||
.@"enum" => {
|
||||
const T = @TypeOf(value);
|
||||
if (@hasDecl(T, "toString")) {
|
||||
return simpleZigValueToJs(isolate, value.toString(), fail);
|
||||
}
|
||||
},
|
||||
else => {},
|
||||
}
|
||||
if (fail) {
|
||||
|
||||
Reference in New Issue
Block a user