Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix iframe panic on navigation #1346

Merged
merged 3 commits into from
May 24, 2024
Merged

Fix iframe panic on navigation #1346

merged 3 commits into from
May 24, 2024

Commits on May 24, 2024

  1. Move handleFrameTree

    handleFrameTree is called when a new frame session is created for a new
    frame that is attached. Some of these frames are not mainframes but do
    contains a tree structures with child frames. If we don't handle the
    frame tree for these non-mainframes, this will prevent navigations from
    being handled for these frames and a panic/error which would stop the
    test iteration.
    ankur22 committed May 24, 2024
    Configuration menu
    Copy the full SHA
    89a9589 View commit details
    Browse the repository at this point in the history
  2. Add initialFrame parameter to handleFrameTree

    The only reason we have initialFrame flag is to use in logging, so it's
    not an important thing to factor in for the runtime, but it may help in
    debugging issues. Rather than remove it, I've changed it so any
    mainframe is regarded as the initialFrame.
    ankur22 committed May 24, 2024
    Configuration menu
    Copy the full SHA
    2746662 View commit details
    Browse the repository at this point in the history
  3. Add fix to prevent iframe panic on navigation

    The change prevents the iframe child frames from being removed when a
    detach event comes in from Chrome.
    
    An iframe seems to be associated to multiple sessions. The initial
    sessions that is linked to the mainframe that the iframe belongs to and
    its own session. When the page navigates, a detach event arrives with
    the initial session and a swap type for the iframe. The iframe though
    is associated to its own session. In this scenario we want to avoid
    removing frames, which prevents panics occurring when the iframe
    navigates.
    ankur22 committed May 24, 2024
    Configuration menu
    Copy the full SHA
    0a6d3bf View commit details
    Browse the repository at this point in the history