mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-03-22 04:34:44 +00:00
Merge pull request #1645 from lightpanda-io/fix-empty-struct
fix: add _pad to IdleDeadline to avoid identity_map pointer aliasing
This commit is contained in:
@@ -29,6 +29,9 @@ const Document = @import("Document.zig");
|
||||
|
||||
const DOMParser = @This();
|
||||
|
||||
// Padding to avoid zero-size struct, which causes identity_map pointer collisions.
|
||||
_pad: bool = false,
|
||||
|
||||
pub fn init() DOMParser {
|
||||
return .{};
|
||||
}
|
||||
|
||||
@@ -20,6 +20,9 @@ const std = @import("std");
|
||||
|
||||
const IdleDeadline = @This();
|
||||
|
||||
// Padding to avoid zero-size struct, which causes identity_map pointer collisions.
|
||||
_pad: bool = false,
|
||||
|
||||
pub fn init() IdleDeadline {
|
||||
return .{};
|
||||
}
|
||||
|
||||
@@ -22,6 +22,9 @@ const Element = @import("Element.zig");
|
||||
|
||||
pub const ResizeObserver = @This();
|
||||
|
||||
// Padding to avoid zero-size struct, which causes identity_map pointer collisions.
|
||||
_pad: bool = false,
|
||||
|
||||
fn init(cbk: js.Function) ResizeObserver {
|
||||
_ = cbk;
|
||||
return .{};
|
||||
|
||||
@@ -25,6 +25,9 @@ const dump = @import("../dump.zig");
|
||||
|
||||
const XMLSerializer = @This();
|
||||
|
||||
// Padding to avoid zero-size struct, which causes identity_map pointer collisions.
|
||||
_pad: bool = false,
|
||||
|
||||
pub fn init() XMLSerializer {
|
||||
return .{};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user