Skip to content

RDEV-10232 host initiated unload - #220

Open
Vivokas20 wants to merge 3 commits into
masterfrom
ide/bugfix/RDEV-10232-host-initiated-unload
Open

RDEV-10232 host initiated unload#220
Vivokas20 wants to merge 3 commits into
masterfrom
ide/bugfix/RDEV-10232-host-initiated-unload

Conversation

@Vivokas20

Copy link
Copy Markdown
Contributor

https://outsystemsrd.atlassian.net/browse/RDEV-10232

What

OnWebViewJavascriptContextReleased no longer tears everything down on the spot: it only records
the loss, and the existing cleanup runs unchanged when the next main view initializes
(NotifyViewInitialized), before any of its child views register.

Also adds ReactViewDiagnostics, a subscribable event that reports what used to fail silently:
calls buffered on a stopped execution engine, evaluations answered with default, engines flushing
buffered calls, failed loader calls (now .catched to the console), and the context-loss events
themselves. The library stays logger-free; hosts route the messages into their own telemetry.

Why

A context release can arrive out of order with the creation of its replacement, so it only proves
the OLD context is gone — not that the current document's views are. Running the cleanup on release
stranded every live inner view: native objects unregistered while their JS stayed mounted, and
execution engines reset to a never-started state that buffers every later call forever, since only
a view load restarts an engine.

On a real navigation nothing changes: the cleanup still runs, at main-view initialization,
milliseconds later.

@Vivokas20 Vivokas20 self-assigned this Sep 9, 2026
@Vivokas20
Vivokas20 requested a review from a team as a code owner September 9, 2026 18:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant