RDEV-10232 host initiated unload - #220
Open
Vivokas20 wants to merge 3 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://outsystemsrd.atlassian.net/browse/RDEV-10232
What
OnWebViewJavascriptContextReleasedno longer tears everything down on the spot: it only recordsthe 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 flushingbuffered calls, failed loader calls (now
.catched to the console), and the context-loss eventsthemselves. 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.