Skip to content

Commit 3f9b256

Browse files
authored
Merge pull request #812 from lightpanda-io/identity_map_collision
We cannot have empty Zig structs mapping to JS instances
2 parents 9ea9859 + 9c4088b commit 3f9b256

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/browser/crypto/crypto.zig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ const uuidv4 = @import("../../id.zig").uuidv4;
2121

2222
// https://w3c.github.io/webcrypto/#crypto-interface
2323
pub const Crypto = struct {
24+
_not_empty: bool = true,
25+
2426
pub fn _getRandomValues(_: *const Crypto, into: RandomValues) !RandomValues {
2527
const buf = into.asBuffer();
2628
if (buf.len > 65_536) {

src/browser/css/css.zig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ pub const Interfaces = .{
2929

3030
// https://developer.mozilla.org/en-US/docs/Web/API/CSS
3131
pub const Css = struct {
32+
_not_empty: bool = true,
33+
3234
pub fn _supports(_: *Css, _: []const u8, _: ?[]const u8) bool {
3335
// TODO: Actually respond with which CSS features we support.
3436
return true;

0 commit comments

Comments
 (0)