Vista remota: l'avvio dei fotogrammi si ritenta mentre la pagina cambia documento
Da ReadyToCommitNavigation al commit di una navigazione con un nuovo RenderFrameHost (con RenderDocument: ogni navigazione, anche verso la pagina di riposo) Chromium rifiuta Page.startScreencast con -32000 «Not attached to an active page». La vista aperta in quel momento (insieme alla pagina di accesso, dopo un riposo del motore, durante una sessione) finiva in «Il browser di Febe non risponde». Ora ScreencastSession rimanda l'avvio solo su quella risposta, con pause da 100 a 500 ms e per al più 5 s sull'orologio vero (IClock, iniettabile nelle prove); ogni altro errore sale subito com'era. Nessun comando CDP nuovo. Vale anche per il riavvio dei fotogrammi dopo un riavvio del browser. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
edade61b72
commit
724c0752cf
3 files changed
+81
-14
No files matched your search
@@ -64,12 +64,16 @@ public sealed class RemoteViewSession : IAsyncDisposable
|
||||
private IDisposable? _lease;
|
||||
private int _buttons;
|
||||
|
||||
public RemoteViewSession(ICdpSession cdp, UserDrivingGate gate, IBrowserLog? log = null)
|
||||
/// <param name="cdp">The page session.</param>
|
||||
/// <param name="gate">Where the «Alberto is driving» lease is taken.</param>
|
||||
/// <param name="log">Where opening and closing are noted (never keys).</param>
|
||||
/// <param name="clock">Wall-clock time for the screencast's start attempts; null: the system clock.</param>
|
||||
public RemoteViewSession(ICdpSession cdp, UserDrivingGate gate, IBrowserLog? log = null, IClock? clock = null)
|
||||
{
|
||||
_cdp = cdp ?? throw new ArgumentNullException(nameof(cdp));
|
||||
_gate = gate ?? throw new ArgumentNullException(nameof(gate));
|
||||
_log = log ?? NullBrowserLog.Instance;
|
||||
Screencast = new ScreencastSession(cdp, _log);
|
||||
Screencast = new ScreencastSession(cdp, _log, clock);
|
||||
}
|
||||
|
||||
public ScreencastSession Screencast { get; }
|
||||
|
||||
Reference in new issue
Block a user