From f9cdc12bf6df841a1f552e6f4f096ef831461d24 Mon Sep 17 00:00:00 2001 From: Pierre Tachoire Date: Thu, 30 Apr 2026 09:08:04 +0200 Subject: [PATCH] use qn.is_about_blank for check instead of string comparison And fix comment --- src/browser/Session.zig | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/browser/Session.zig b/src/browser/Session.zig index 05b976cf..1861ddb8 100644 --- a/src/browser/Session.zig +++ b/src/browser/Session.zig @@ -478,10 +478,9 @@ fn processRootQueuedNavigation(self: *Session) !void { current_frame._queued_navigation = null; // Synthetic navigations (about:blank, blob:) commit instantly — no HTTP, - // so there is no in-flight window to worry about. Use the legacy + // so there is no in-flight window to worry about. Use the optimized // immediate-swap path for them. - const is_synthetic = std.mem.eql(u8, qn.url, "about:blank") or - std.mem.startsWith(u8, qn.url, "blob:"); + const is_synthetic = qn.is_about_blank or std.mem.startsWith(u8, qn.url, "blob:"); if (is_synthetic) { return self.replaceRootImmediate(current_frame._frame_id, qn);