From df46bed3573cd2916c2a5c2b46dff7db6f962379 Mon Sep 17 00:00:00 2001 From: Yuzu Saijo Date: Fri, 5 Jun 2026 01:24:15 -0700 Subject: [PATCH] Delay NavigationAPI restore callback after execution context resume This CL delays NavigationAPI's restore callback timing, triggered by bfcache restore, after the execution context resumes. It used to run when the execution context is frozen. JavaScript execution while frozen is not safe and should be avoided. Bug:520233115 Change-Id: I888ea7f63364b2cb1fcff05d885465d86d506766 --- .../navigate-event/defer/tentative/restore-after-bfcache.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/navigation-api/navigate-event/defer/tentative/restore-after-bfcache.html b/navigation-api/navigate-event/defer/tentative/restore-after-bfcache.html index 8404241a7dce67..d787cf083058ee 100644 --- a/navigation-api/navigate-event/defer/tentative/restore-after-bfcache.html +++ b/navigation-api/navigate-event/defer/tentative/restore-after-bfcache.html @@ -19,7 +19,7 @@ funcBeforeNavigation: async () => { window.events = []; await navigation.navigate("#1").finished; - await navigation.back(); + await navigation.back().finished; window.originalEntry1 = navigation.entries()[1]; window.originalEntry1.ondispose = () => events.push("dispose"); window.onpageshow = () => events.push("pageshow");