mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-12-15 15:58:57 +00:00
use _prototype_root decl everywhere
This commit is contained in:
@@ -303,7 +303,7 @@ pub fn destroy(self: *Factory, value: anytype) void {
|
||||
|
||||
if (comptime IS_DEBUG) {
|
||||
// We should always destroy from the leaf down.
|
||||
if (@hasField(S, "_type") and @typeInfo(@TypeOf(value._type)) == .@"union") {
|
||||
if (@hasDecl(S, "_prototype_root")) {
|
||||
// A Event{._type == .generic} (or any other similar types)
|
||||
// _should_ be destoyed directly. The _type = .generic is a pseudo
|
||||
// child
|
||||
|
||||
Reference in New Issue
Block a user