mirror of
https://github.com/priyanshujain/sanderling.git
synced 2026-10-03 03:27:10 +00:00
feat(chrome): read the page's exceptions and navigations, and hold the picker state across them
a page navigation replaces the runtime, so the seeded picker restarted the seed's stream at its first draw on every reload and a trace could not tell a reload from a generator repeating itself. the driver now drains the main-frame navigations it saw, reports the page's buffered uncaught errors so state.exceptions is the page's list on the goja host too, and carries the picker's draw position out of v8 and back in around each decision.
This commit is contained in:
1 parent
45dd52c5d9
commit
944d1e9ad9
8 files changed
+331
-3
No files matched your search
@@ -672,6 +672,12 @@ defineLockedGlobal("__sanderlingSetLastAction__", (value: unknown) => {
|
||||
lastAction = value ?? null;
|
||||
});
|
||||
|
||||
// The host reads the same buffer buildState puts behind state.exceptions, so
|
||||
// the goja-side state.exceptions is the page's list rather than the empty one
|
||||
// it held before, and the trace records an error surface an offline oracle can
|
||||
// read back.
|
||||
defineLockedGlobal("__sanderlingExceptions__", () => capturedExceptions.slice());
|
||||
|
||||
// writable:false stops a page script from shadowing the runtime via plain
|
||||
// assignment (the realistic in-page threat). configurable:true is required so
|
||||
// unit tests sharing one process can reinstall a fake via defineProperty; a
|
||||
|
||||
Reference in new issue
Block a user