fix(license): store denial path on persistent context before guard install

Persist _cloak_denial_path on the context object in
launch_persistent_context_async so the license guard has access to the
denial path after installation.
This commit is contained in:
CloakHQ
2026-08-19 22:21:47 +02:00
parent 0f375a3ab6
commit d30572f070
+1
View File
@@ -877,6 +877,7 @@ async def launch_persistent_context_async(
# the sync variant): guard those existing pages so a post-handshake denial on
# pages[0] surfaces cleanly instead of as a bare TargetClosedError.
if denial_path:
context._cloak_denial_path = denial_path
_install_license_guard_async(context, denial_path)
for _pg in context.pages:
_install_license_guard_async(_pg, denial_path)