Skip to content

constellation: prevent panic when constellation receives message from closed pipeline#39745

Merged
gterzian merged 3 commits into
servo:mainfrom
gterzian:prevent_panic_in_message_handling_from_closed_pipeline
Oct 14, 2025
Merged

constellation: prevent panic when constellation receives message from closed pipeline#39745
gterzian merged 3 commits into
servo:mainfrom
gterzian:prevent_panic_in_message_handling_from_closed_pipeline

Conversation

@gterzian
Copy link
Copy Markdown
Member

@gterzian gterzian commented Oct 9, 2025

As part of #31973, I noticed that the intermittent crash of /html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-3.html appears due to the closing of the of the source webview of the message, which prior to these changes would result in an early return and drop the reply sender, resulting in a panic.

This change makes the check for whether the webview is still open specific to certain messages that need the webview and GetBrowsingContextInfo is not one of them.

As to exactly what allows a webview to be closed and still send a GetBrowsingContextInfo message, it appears that the iframe and the pop-up opened by the iframe share the same webview, and when the pop-up calls close, that closes the webview but the iframe is still running and then receives a post message from a webview that was already closed(intermittently). See #39748

Testing: WPT
Fixes: #22647

@gterzian gterzian added the T-linux-wpt Do a try run of the WPT label Oct 9, 2025
@github-actions github-actions Bot removed the T-linux-wpt Do a try run of the WPT label Oct 9, 2025
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Oct 9, 2025

🔨 Triggering try run (#18387250089) for Linux (WPT)

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Oct 9, 2025

Test results for linux-wpt from try job (#18387250089):

Flaky unexpected result (34)
  • TIMEOUT /FileAPI/url/url-in-tags-revoke.window.html (#19978)
    • TIMEOUT [expected PASS] subtest: Fetching a blob URL immediately before revoking it works in <script> tags.

      Test timed out
      

  • OK /IndexedDB/idbfactory_open.any.html
    • FAIL [expected PASS] subtest: Calling open() with version argument 1.5 should not throw.

      assert_equals: version expected 1 but got 9007199254740991
      

  • TIMEOUT [expected OK] /_mozilla/mozilla/window_resize_event.html (#36741)
    • TIMEOUT [expected PASS] subtest: Popup onresize event fires after resizeTo

      Test timed out
      

  • TIMEOUT [expected PASS] /_mozilla/shadow-dom/move-element-with-ua-shadow-tree-crash.html (#39473)
  • OK /_webgl/conformance/textures/misc/texture-upload-size.html (#21770)
    • PASS [expected FAIL] subtest: WebGL test #45
    • PASS [expected FAIL] subtest: WebGL test #47
    • PASS [expected FAIL] subtest: WebGL test #49
    • PASS [expected FAIL] subtest: WebGL test #51
    • FAIL [expected PASS] subtest: WebGL test #53

      assert_true: Texture was smaller than the expected size 2x2 expected true got false
      

    • FAIL [expected PASS] subtest: WebGL test #55

      assert_true: getError expected: INVALID_VALUE. Was NO_ERROR : when calling texSubImage2D with the same texture upload with offset 1, 1 expected true got false
      

    • FAIL [expected PASS] subtest: WebGL test #57

      assert_true: Texture was smaller than the expected size 2x2 expected true got false
      

    • FAIL [expected PASS] subtest: WebGL test #59

      assert_true: getError expected: INVALID_VALUE. Was NO_ERROR : when calling texSubImage2D with the same texture upload with offset 1, 1 expected true got false
      

    • PASS [expected FAIL] subtest: WebGL test #61
    • PASS [expected FAIL] subtest: WebGL test #63
    • And 10 more unexpected results...
  • FAIL [expected PASS] /css/CSS2/fonts/font-029.xht
  • FAIL [expected PASS] /css/CSS2/linebox/vertical-align-064.xht
  • FAIL [expected PASS] /css/CSS2/text/letter-spacing-029.xht
  • FAIL [expected PASS] /css/WOFF2/header-numTables-001.xht
  • FAIL [expected PASS] /css/WOFF2/metadatadisplay-schema-copyright-010.xht
  • FAIL [expected PASS] /css/WOFF2/metadatadisplay-schema-description-010.xht
  • FAIL [expected PASS] /css/WOFF2/metadatadisplay-well-formed-003.xht
  • OK /css/css-cascade/layer-cssom-order-reverse.html (#36094)
    • FAIL [expected PASS] subtest: Delete layer invalidates @font-face

      assert_equals: expected "220px" but got "133px"
      

  • FAIL [expected PASS] /css/css-flexbox/flexbox_flex-natural-mixed-basis-auto.html
  • FAIL [expected PASS] /css/css-fonts/font-palette-31.html
  • OK /css/css-fonts/generic-family-keywords-001.html (#37467)
    • PASS [expected FAIL] subtest: @font-face matching for quoted and unquoted generic(fangsong)
    • PASS [expected FAIL] subtest: @font-face matching for quoted and unquoted generic(kai)
    • PASS [expected FAIL] subtest: @font-face matching for quoted and unquoted generic(khmer-mul)
    • PASS [expected FAIL] subtest: @font-face matching for quoted and unquoted generic(nastaliq)
  • FAIL [expected PASS] /css/css-fonts/variations/font-slant-2c.html
  • FAIL [expected PASS] /css/css-text-decor/text-decoration-line-012.xht
  • FAIL [expected PASS] /css/css-text/letter-spacing/letter-spacing-211.html (#39600)
  • OK /html/browsers/browsing-the-web/navigating-across-documents/navigation-unload-same-origin.window.html (#29049)
    • PASS [expected FAIL] subtest: Same-origin navigation started from unload handler must be ignored
  • TIMEOUT /html/browsers/history/the-history-interface/001.html (#12580)
    • FAIL [expected PASS] subtest: traversing history must also traverse hash changes

      assert_equals: (this could cause other failures later on) expected "" but got "test"
      

  • TIMEOUT [expected PASS] /html/browsers/origin/origin-keyed-agent-clusters/popups-crash.https.html
  • TIMEOUT /html/interaction/focus/the-autofocus-attribute/supported-elements.html (#24145)
    • FAIL [expected TIMEOUT] subtest: Element with tabindex should support autofocus

      assert_equals: expected "SPAN" but got "BODY"
      

    • TIMEOUT [expected NOTRUN] subtest: Non-HTMLElement should not support autofocus

      Test timed out
      

  • FAIL [expected PASS] /html/rendering/the-details-element/details-summary-display-inline-002.html
  • OK /html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/allow-scripts-flag-changing-1.html (#39694)
    • PASS [expected FAIL] subtest: Meta refresh is blocked by the allow-scripts sandbox flag at its creation time, not when refresh comes due
  • TIMEOUT [expected OK] /html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-1.html (#22647)
    • TIMEOUT [expected FAIL] subtest: Check that popups from a sandboxed iframe escape the sandbox if allow-popups-to-escape-sandbox is used

      Test timed out
      

  • TIMEOUT [expected OK] /html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-2.html (#22667)
    • TIMEOUT [expected FAIL] subtest: Check that popups from a sandboxed iframe escape the sandbox if allow-popups-to-escape-sandbox is used

      Test timed out
      

  • TIMEOUT [expected OK] /html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-2.html (#22154)
    • NOTRUN [expected FAIL] subtest: Check that popups from a sandboxed iframe do not escape the sandbox
  • OK [expected CRASH] /html/semantics/forms/the-fieldset-element/disabled-003.html (#31730, #39631)
  • FAIL [expected PASS] /shadow-dom/shadow-style-invalidation-vw-units.html (#38468)
  • OK /trusted-types/trusted-types-navigation.html?21-25 (#38997)
    • FAIL [expected PASS] subtest: Navigate a window via form-submission with javascript:-urls in enforcing mode.

      promise_test: Unhandled rejection with value: "Unexpected message received: \"No securitypolicyviolation reported!\""
      

  • TIMEOUT [expected OK] /webdriver/tests/classic/get_element_property/get.py
  • TIMEOUT [expected OK] /webdriver/tests/classic/perform_actions/navigation.py (#38822)
  • OK [expected TIMEOUT] /webmessaging/with-ports/018.html (#24485)
    • PASS [expected TIMEOUT] subtest: origin of the script that invoked the method, javascript:
Stable unexpected results that are known to be intermittent (29)
  • OK /IndexedDB/idbcursor-continuePrimaryKey-exceptions.any.worker.html (#39277)
    • FAIL [expected PASS] subtest: IDBCursor continuePrimaryKey() on object store cursor

      assert_throws_dom: continuePrimaryKey() should throw if source is not an index function "function() {
              cursor.continuePrimaryKey(2, 2);
            }" threw object "TypeError: cursor.continuePrimaryKey is not a function" that is not a DOMException InvalidAccessError: property "code" is equal to undefined, expected 15
      

  • OK /IndexedDB/idbobjectstore_getAll.any.html (#39276)
    • PASS [expected FAIL] subtest: Get all values with transaction.commit()
  • OK /IndexedDB/idbobjectstore_getAll.any.worker.html (#39400)
    • PASS [expected FAIL] subtest: Get all values with transaction.commit()
  • OK /IndexedDB/key-conversion-exceptions.any.html (#39305)
    • FAIL [expected PASS] subtest: IDBCursor continue() method with throwing/invalid keys

      assert_throws_exactly: key conversion with throwing getter should rethrow function "() => {
            receiver[method](key);
          }" threw object "TypeError: receiver[method] is not a function" but we expected it to throw object "getter: throwing from getter"
      

  • OK /IndexedDB/key-conversion-exceptions.any.worker.html (#39284)
    • FAIL [expected PASS] subtest: IDBCursor continue() method with throwing/invalid keys

      assert_throws_exactly: key conversion with throwing getter should rethrow function "() => {
            receiver[method](key);
          }" threw object "TypeError: receiver[method] is not a function" but we expected it to throw object "getter: throwing from getter"
      

    • PASS [expected FAIL] subtest: IDBCursor update() method with throwing/invalid keys
  • FAIL [expected PASS] /_mozilla/mozilla/sslfail.html (#10760)
  • OK /css/css-fonts/generic-family-keywords-003.html (#38994)
    • PASS [expected FAIL] subtest: @font-face matching for quoted and unquoted serif (drawing text in a canvas)
    • PASS [expected FAIL] subtest: @font-face matching for quoted and unquoted ui-rounded (drawing text in a canvas)
  • OK /css/css-fonts/variations/at-font-face-font-matching.html (#20684)
    • FAIL [expected PASS] subtest: Matching font-style: 'oblique 21deg' should prefer 'oblique 0deg' over 'oblique -50deg -20deg'

      assert_equals: Unexpected font on test element expected 487 but got 532
      

    • PASS [expected FAIL] subtest: Matching font-style: 'oblique -20deg' should prefer 'oblique 40deg 50deg' over 'italic'
  • OK /css/css-fonts/variations/font-weight-matching.html (#38577)
    • FAIL [expected PASS] subtest: Test @font-face matching for weight 600

      assert_approx_equals: @font-face should be mapped to CSSTest Weights 200. expected 90 +/- 2 but got 92.56666666666666
      

    • FAIL [expected PASS] subtest: Test @font-face matching for weight 750

      assert_approx_equals: @font-face should be mapped to CSSTest Weights 200. expected 90 +/- 2 but got 92.56666666666666
      

    • FAIL [expected PASS] subtest: Test @font-face matching for weight 751

      assert_approx_equals: @font-face should be mapped to CSSTest Weights 100. expected 90 +/- 2 but got 92.56666666666666
      

    • FAIL [expected PASS] subtest: Test @font-face matching for weight 900

      assert_approx_equals: @font-face should be mapped to CSSTest Weights 100. expected 90 +/- 2 but got 92.56666666666666
      

    • FAIL [expected PASS] subtest: Test @font-face matching for weight 1000

      assert_approx_equals: @font-face should be mapped to CSSTest Weights 100. expected 90 +/- 2 but got 92.56666666666666
      

  • TIMEOUT [expected FAIL] /dom/xslt/large-cdata.html (#38029)
  • OK /fetch/metadata/generated/css-font-face.https.sub.tentative.html (#32732)
    • FAIL [expected PASS] subtest: sec-fetch-dest

      promise_test: Unhandled rejection with value: object "Error: Failed to query for recorded headers."
      

    • PASS [expected FAIL] subtest: sec-fetch-user
    • PASS [expected FAIL] subtest: sec-fetch-storage-access - Same site
  • OK /fetch/metadata/generated/css-font-face.sub.tentative.html (#34624)
    • PASS [expected FAIL] subtest: sec-fetch-storage-access - Not sent to non-trustworthy same-origin destination
    • PASS [expected FAIL] subtest: sec-fetch-storage-access - Not sent to non-trustworthy same-site destination
    • PASS [expected FAIL] subtest: sec-fetch-storage-access - Not sent to non-trustworthy cross-site destination
  • CRASH [expected TIMEOUT] /html/anonymous-iframe/indexeddb.tentative.https.window.html (#39254)
  • OK /html/browsers/browsing-the-web/navigating-across-documents/008.html (#24456)
    • PASS [expected FAIL] subtest: Link with onclick form submit to javascript url and href navigation
  • OK /html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/iframe-src-aboutblank-navigate-immediately.html (#29048)
    • FAIL [expected PASS] subtest: Navigating to a different document with location.assign

      assert_equals: expected "http://web-platform.test:8000/common/blank.html?1" but got "about:blank"
      

  • OK /html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/load-pageshow-events-iframe-contentWindow.html (#28681)
    • FAIL [expected PASS] subtest: load & pageshow events do not fire on contentWindow of <iframe> element created with src=''

      assert_unreached: load should not be fired Reached unreachable code
      

  • OK /html/browsers/browsing-the-web/navigating-across-documents/replace-before-load/a-click.html (#28697)
    • PASS [expected FAIL] subtest: aElement.click() before the load event must NOT replace
  • OK [expected TIMEOUT] /html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-3.html (#24057)
    • FAIL [expected TIMEOUT] subtest: Check that popups from a sandboxed iframe escape the sandbox if allow-popups-to-escape-sandbox is used

      assert_equals: It came from a sandboxed iframe expected "null" but got "http://web-platform.test:8000"
      

  • TIMEOUT [expected CRASH] /html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-1.html (#24066)
    • NOTRUN [expected FAIL] subtest: Check that popups from a sandboxed iframe do not escape the sandbox
  • OK [expected CRASH] /html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-3.html (#24066)
  • OK /html/semantics/forms/form-submission-0/text-plain.window.html (#28687)
    • PASS [expected FAIL] subtest: text/plain: Basic test (normal form)
  • OK /html/semantics/forms/form-submission-0/urlencoded2.window.html (#28687)
    • FAIL [expected PASS] subtest: application/x-www-form-urlencoded: Basic test (normal form)

      assert_equals: expected "basic=test" but got ""
      

  • OK /preload/preload-error.sub.html (#37177)
    • PASS [expected FAIL] subtest: success (fetch): main
  • OK [expected TIMEOUT] /resource-timing/nested-context-navigations-iframe.html (#24311)
    • PASS [expected NOTRUN] subtest: Test that cross-site iframe navigations are not observable by the parent, even after history navigations by the parent
    • PASS [expected NOTRUN] subtest: Test that iframe navigations are not observable by the parent
    • PASS [expected NOTRUN] subtest: Test that crossorigin iframe navigations are not observable by the parent
    • PASS [expected NOTRUN] subtest: Test that cross-site iframe navigations are not observable by the parent
    • PASS [expected NOTRUN] subtest: Test that iframe refreshes are not observable by the parent
    • PASS [expected NOTRUN] subtest: Test that crossorigin iframe refreshes are not observable by the parent
    • PASS [expected NOTRUN] subtest: Test that cross-site iframe refreshes are not observable by the parent
  • OK /trusted-types/trusted-types-navigation.html?01-05 (#38975)
    • PASS [expected FAIL] subtest: Navigate a window via anchor with javascript:-urls in enforcing mode.
  • OK /trusted-types/trusted-types-navigation.html?26-30 (#38807)
    • FAIL [expected PASS] subtest: Navigate a window via form-submission with javascript:-urls in report-only mode.

      promise_test: Unhandled rejection with value: "Unexpected message received: \"No securitypolicyviolation reported!\""
      

  • OK /webdriver/tests/classic/dismiss_alert/dismiss.py (#39098)
    • PASS [expected FAIL] subtest: test_dismiss_in_popup_window
  • TIMEOUT [expected OK] /webstorage/localstorage-about-blank-3P-iframe-opens-3P-window.partitioned.html (#29053)
    • TIMEOUT [expected PASS] subtest: StorageKey: test 3P about:blank window opened from a 3P iframe

      Test timed out
      

  • OK [expected ERROR] /webxr/render_state_update.https.html (#27535)
Stable unexpected results (1)
  • OK /focus/activeelement-after-focusing-different-site-iframe-contentwindow.html
    • PASS [expected FAIL] subtest: Check trailing events

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Oct 9, 2025

⚠️ Try run (#18387250089) failed.

@mrobinson
Copy link
Copy Markdown
Member

mrobinson commented Oct 9, 2025

This is a bit odd. It should be impossible for a popup to be opened in same WebView as the opener. The popup code creates an entirely new top level browsing context which is assigned to a new WebView by the embedding layer. I think there must be something deeper going wrong.

@gterzian gterzian added the T-linux-wpt Do a try run of the WPT label Oct 10, 2025
@github-actions github-actions Bot removed the T-linux-wpt Do a try run of the WPT label Oct 10, 2025
@github-actions
Copy link
Copy Markdown

🔨 Triggering try run (#18400862229) for Linux (WPT)

@gterzian
Copy link
Copy Markdown
Member Author

think there must be something deeper going wrong.

Defenitely, this PR only fixes the panic. The underlying problem is discussed at #39748

@github-actions
Copy link
Copy Markdown

Test results for linux-wpt from try job (#18400862229):

Flaky unexpected result (26)
  • OK /FileAPI/url/url-with-fetch.any.worker.html (#21517)
    • FAIL [expected PASS] subtest: Revoke blob URL after calling fetch, fetch should succeed

      promise_test: Unhandled rejection with value: object "TypeError: Network error occurred"
      

  • OK /IndexedDB/idbfactory_open.any.html
    • FAIL [expected PASS] subtest: Calling open() with version argument 1.5 should not throw.

      assert_equals: version expected 1 but got 9007199254740991
      

  • FAIL [expected PASS] /_mozilla/css/iframe/hide_and_show.html (#15265)
  • FAIL [expected PASS] /_mozilla/gfx-rs-gecko/descriptor-ranges.html (#23258)
  • FAIL [expected PASS] /css/CSS2/positioning/absolute-non-replaced-width-021.xht
  • FAIL [expected PASS] /css/WOFF2/datatypes-invalid-base128-003.xht
  • FAIL [expected PASS] /css/WOFF2/metadatadisplay-schema-credits-005.xht
  • OK /css/css-cascade/layer-font-face-override.html (#35935)
    • FAIL [expected PASS] subtest: @font-face override update with appended sheet 1

      assert_equals: expected "80px" but got "41.45px"
      

    • FAIL [expected PASS] subtest: @font-face override update with appended sheet 2

      assert_equals: expected "80px" but got "41.45px"
      

  • OK /css/css-fonts/generic-family-keywords-003.html (#38994)
    • PASS [expected FAIL] subtest: @font-face matching for quoted and unquoted serif (drawing text in a canvas)
  • FAIL [expected PASS] /css/css-text/line-breaking/line-breaking-atomic-021.html
  • TIMEOUT [expected FAIL] /dom/xslt/large-cdata.html (#38029)
  • TIMEOUT /fetch/metadata/generated/css-images.sub.tentative.html (#29047)
    • TIMEOUT [expected PASS] subtest: background-image sec-fetch-user - Not sent to non-trustworthy cross-site destination

      Test timed out
      

  • OK /html/browsers/browsing-the-web/navigating-across-documents/navigation-unload-cross-origin.sub.window.html (#29056)
    • FAIL [expected PASS] subtest: Cross-origin navigation started from unload handler must be ignored

      promise_test: Unhandled rejection with value: object "SecurityError: The operation is insecure."
      

  • OK /html/browsers/browsing-the-web/navigating-across-documents/replace-before-load/a-click.html (#28697)
    • PASS [expected FAIL] subtest: aElement.click() before the load event must NOT replace
  • OK /html/browsers/history/the-history-interface/traverse_the_history_2.html (#21383)
    • PASS [expected FAIL] subtest: Multiple history traversals, last would be aborted
  • OK /html/browsers/history/the-history-interface/traverse_the_history_3.html (#21383)
    • PASS [expected FAIL] subtest: Multiple history traversals, last would be aborted
  • TIMEOUT [expected PASS] /html/browsers/origin/origin-keyed-agent-clusters/popups-crash.https.html
  • TIMEOUT [expected OK] /html/interaction/focus/the-autofocus-attribute/update-the-rendering.html (#24145)
    • TIMEOUT [expected FAIL] subtest: "Flush autofocus candidates" should be happen before a scroll event and animation frame callbacks

      Test timed out
      

  • OK /html/semantics/embedded-content/media-elements/loading-the-media-resource/load-events-networkState.html
    • FAIL [expected PASS] subtest: NETWORK_NO_SOURCE

      assert_equals: expected 3 but got 1
      

  • OK /html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-invoke-pause-networkState.html
    • FAIL [expected PASS] subtest: NOT invoking resource selection with pause() when networkState is not NETWORK_EMPTY

      assert_equals: networkState in onerror expected 3 but got 1
      

  • OK /html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-reload-location-reload.html (#32595)
    • FAIL [expected PASS] subtest: Reloading iframe loading='lazy' before it is loaded: location.reload

      uncaught exception: Error: assert_equals: expected "http://web-platform.test:8000/html/semantics/embedded-content/the-iframe-element/support/blank.htm?src" but got "about:blank"
      

  • TIMEOUT [expected OK] /html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_other_frame_popup.sub.html (#39702)
    • TIMEOUT [expected FAIL] subtest: Sandboxed iframe can not navigate other frame's popup

      Test timed out
      

  • OK [expected CRASH] /html/semantics/forms/the-fieldset-element/disabled-003.html (#31730, #39631)
  • OK /preload/link-header-preload-delay-onload.html (#39622)
    • FAIL [expected PASS] subtest: Makes sure that Link headers preload resources and block window.onload after resource discovery

      assert_true: expected true got false
      

  • OK /trusted-types/trusted-types-navigation.html?31-35 (#38034)
    • PASS [expected FAIL] subtest: Navigate a frame via form-submission with javascript:-urls in report-only mode.
  • OK /xhr/send-redirect.htm (#32026)
    • FAIL [expected PASS] subtest: XMLHttpRequest: send() - Redirects (basics) (303, HEAD, content.py)

      assert_equals: expected (string) "HEAD" but got (object) null
      

Stable unexpected results that are known to be intermittent (28)
  • OK /IndexedDB/idbcursor-continuePrimaryKey-exceptions.any.worker.html (#39277)
    • FAIL [expected PASS] subtest: IDBCursor continuePrimaryKey() on object store cursor

      assert_throws_dom: continuePrimaryKey() should throw if source is not an index function "function() {
              cursor.continuePrimaryKey(2, 2);
            }" threw object "TypeError: cursor.continuePrimaryKey is not a function" that is not a DOMException InvalidAccessError: property "code" is equal to undefined, expected 15
      

  • OK /IndexedDB/idbobjectstore_getAll.any.html (#39276)
    • PASS [expected FAIL] subtest: Get all values with transaction.commit()
  • OK /IndexedDB/idbobjectstore_getAll.any.worker.html (#39400)
    • PASS [expected FAIL] subtest: Get all values with transaction.commit()
  • OK /IndexedDB/key-conversion-exceptions.any.html (#39305)
    • FAIL [expected PASS] subtest: IDBCursor continue() method with throwing/invalid keys

      assert_throws_exactly: key conversion with throwing getter should rethrow function "() => {
            receiver[method](key);
          }" threw object "TypeError: receiver[method] is not a function" but we expected it to throw object "getter: throwing from getter"
      

  • FAIL [expected PASS] /_mozilla/mozilla/sslfail.html (#10760)
  • TIMEOUT [expected OK] /_mozilla/mozilla/window_resize_event.html (#36741)
    • TIMEOUT [expected PASS] subtest: Popup onresize event fires after resizeTo

      Test timed out
      

  • OK /_webgl/conformance/textures/misc/texture-upload-size.html (#21770)
    • PASS [expected FAIL] subtest: WebGL test #45
    • PASS [expected FAIL] subtest: WebGL test #47
    • PASS [expected FAIL] subtest: WebGL test #49
    • PASS [expected FAIL] subtest: WebGL test #51
    • FAIL [expected PASS] subtest: WebGL test #53

      assert_true: Texture was smaller than the expected size 2x2 expected true got false
      

    • FAIL [expected PASS] subtest: WebGL test #55

      assert_true: getError expected: INVALID_VALUE. Was NO_ERROR : when calling texSubImage2D with the same texture upload with offset 1, 1 expected true got false
      

    • FAIL [expected PASS] subtest: WebGL test #57

      assert_true: Texture was smaller than the expected size 2x2 expected true got false
      

    • FAIL [expected PASS] subtest: WebGL test #59

      assert_true: getError expected: INVALID_VALUE. Was NO_ERROR : when calling texSubImage2D with the same texture upload with offset 1, 1 expected true got false
      

    • PASS [expected FAIL] subtest: WebGL test #61
    • PASS [expected FAIL] subtest: WebGL test #63
    • And 10 more unexpected results...
  • OK /content-security-policy/frame-ancestors/frame-ancestors-path-ignored.window.html (#36468)
    • PASS [expected FAIL] subtest: A 'frame-ancestors' CSP directive with a URL that includes a path should be ignored.
  • OK /css/css-cascade/layer-cssom-order-reverse.html (#36094)
    • FAIL [expected PASS] subtest: Delete layer invalidates @font-face

      assert_equals: expected "220px" but got "133px"
      

  • OK /css/css-fonts/variations/font-weight-matching.html (#38577)
    • FAIL [expected PASS] subtest: Test @font-face matching for weight 600

      assert_approx_equals: @font-face should be mapped to CSSTest Weights 200. expected 90 +/- 2 but got 92.56666666666666
      

    • FAIL [expected PASS] subtest: Test @font-face matching for weight 750

      assert_approx_equals: @font-face should be mapped to CSSTest Weights 200. expected 90 +/- 2 but got 92.56666666666666
      

    • FAIL [expected PASS] subtest: Test @font-face matching for weight 751

      assert_approx_equals: @font-face should be mapped to CSSTest Weights 100. expected 90 +/- 2 but got 92.56666666666666
      

    • FAIL [expected PASS] subtest: Test @font-face matching for weight 900

      assert_approx_equals: @font-face should be mapped to CSSTest Weights 100. expected 90 +/- 2 but got 92.56666666666666
      

    • FAIL [expected PASS] subtest: Test @font-face matching for weight 1000

      assert_approx_equals: @font-face should be mapped to CSSTest Weights 100. expected 90 +/- 2 but got 92.56666666666666
      

  • OK /fetch/metadata/generated/css-font-face.sub.tentative.html (#34624)
    • PASS [expected FAIL] subtest: sec-fetch-storage-access - Not sent to non-trustworthy same-origin destination
    • PASS [expected FAIL] subtest: sec-fetch-storage-access - Not sent to non-trustworthy same-site destination
  • CRASH [expected TIMEOUT] /html/anonymous-iframe/indexeddb.tentative.https.window.html (#39254)
  • OK /html/browsers/browsing-the-web/navigating-across-documents/005.html (#27062)
    • FAIL [expected PASS] subtest: Link with onclick navigation and href navigation

      assert_equals: expected "href" but got "click"
      

  • OK /html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/load-pageshow-events-iframe-contentWindow.html (#28681)
    • FAIL [expected PASS] subtest: load & pageshow events do not fire on contentWindow of <iframe> element created with src=''

      assert_unreached: load should not be fired Reached unreachable code
      

  • OK /html/browsers/browsing-the-web/navigating-across-documents/navigation-unload-same-origin-fragment.html (#20768)
    • FAIL [expected PASS] subtest: Tests that a fragment navigation in the unload handler will not block the initial navigation

      assert_equals: expected "" but got "#fragment"
      

  • OK [expected TIMEOUT] /html/interaction/focus/the-autofocus-attribute/supported-elements.html (#24145)
    • FAIL [expected TIMEOUT] subtest: Element with tabindex should support autofocus

      assert_equals: expected "SPAN" but got "BODY"
      

    • PASS [expected NOTRUN] subtest: Non-HTMLElement should not support autofocus
    • FAIL [expected NOTRUN] subtest: Host element with delegatesFocus should support autofocus

      assert_equals: expected Element node <div autofocus=""></div> but got Element node <body><div autofocus=""></div></body>
      

    • FAIL [expected NOTRUN] subtest: Host element with delegatesFocus including no focusable descendants should be skipped

      assert_equals: expected Element node <input autofocus=""></input> but got Element node <body></body>
      

    • FAIL [expected NOTRUN] subtest: Area element should support autofocus

      assert_equals: expected Element node <area autofocus="" href="/common/blank.html"></area> but got Element node <body>
      <img src="/media/poster.png" usemap="#map">
      <map n...
      

  • TIMEOUT [expected OK] /html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-1.html (#22647)
    • TIMEOUT [expected FAIL] subtest: Check that popups from a sandboxed iframe escape the sandbox if allow-popups-to-escape-sandbox is used

      Test timed out
      

  • OK [expected TIMEOUT] /html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-3.html (#24057)
    • FAIL [expected TIMEOUT] subtest: Check that popups from a sandboxed iframe escape the sandbox if allow-popups-to-escape-sandbox is used

      assert_equals: It came from a sandboxed iframe expected "null" but got "http://web-platform.test:8000"
      

  • OK [expected CRASH] /html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-1.html (#24066)
  • TIMEOUT [expected CRASH] /html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-3.html (#24066)
    • NOTRUN [expected FAIL] subtest: Check that popups from a sandboxed iframe do not escape the sandbox
  • OK /html/semantics/forms/form-submission-0/text-plain.window.html (#28687)
    • PASS [expected FAIL] subtest: text/plain: Basic test (normal form)
  • OK /html/semantics/forms/form-submission-0/urlencoded2.window.html (#28687)
    • FAIL [expected PASS] subtest: application/x-www-form-urlencoded: Basic test (normal form)

      assert_equals: expected "basic=test" but got ""
      

  • OK /navigation-timing/test-navigation-type-reload.html (#33334)
    • PASS [expected FAIL] subtest: Reload domComplete > Original domComplete
    • PASS [expected FAIL] subtest: Reload domContentLoadedEventEnd > Original domContentLoadedEventEnd
    • PASS [expected FAIL] subtest: Reload domContentLoadedEventStart > Original domContentLoadedEventStart
    • PASS [expected FAIL] subtest: Reload domInteractive > Original domInteractive
    • PASS [expected FAIL] subtest: Reload fetchStart > Original fetchStart
    • PASS [expected FAIL] subtest: Reload loadEventEnd > Original loadEventEnd
    • PASS [expected FAIL] subtest: Reload loadEventStart > Original loadEventStart
  • OK [expected TIMEOUT] /resource-timing/nested-context-navigations-iframe.html (#24311)
    • PASS [expected NOTRUN] subtest: Test that cross-site iframe navigations are not observable by the parent, even after history navigations by the parent
    • PASS [expected NOTRUN] subtest: Test that iframe navigations are not observable by the parent
    • PASS [expected NOTRUN] subtest: Test that crossorigin iframe navigations are not observable by the parent
    • PASS [expected NOTRUN] subtest: Test that cross-site iframe navigations are not observable by the parent
    • PASS [expected NOTRUN] subtest: Test that iframe refreshes are not observable by the parent
    • PASS [expected NOTRUN] subtest: Test that crossorigin iframe refreshes are not observable by the parent
    • PASS [expected NOTRUN] subtest: Test that cross-site iframe refreshes are not observable by the parent
  • OK /trusted-types/trusted-types-navigation.html?01-05 (#38975)
    • PASS [expected FAIL] subtest: Navigate a window via anchor with javascript:-urls in report-only mode.
  • OK /trusted-types/trusted-types-navigation.html?26-30 (#38807)
    • FAIL [expected PASS] subtest: Navigate a window via form-submission with javascript:-urls in report-only mode.

      promise_test: Unhandled rejection with value: "Unexpected message received: \"No securitypolicyviolation reported!\""
      

  • OK /webdriver/tests/classic/dismiss_alert/dismiss.py (#39098)
    • PASS [expected FAIL] subtest: test_dismiss_in_popup_window
  • TIMEOUT [expected OK] /webdriver/tests/classic/perform_actions/navigation.py (#38822)
Stable unexpected results (1)
  • OK /focus/activeelement-after-focusing-different-site-iframe-contentwindow.html
    • PASS [expected FAIL] subtest: Check trailing events

@github-actions
Copy link
Copy Markdown

⚠️ Try run (#18400862229) failed.

@gterzian
Copy link
Copy Markdown
Member Author

@gterzian
Copy link
Copy Markdown
Member Author

gterzian commented Oct 10, 2025

Ok I can comfirm that /focus/activeelement-after-focusing-different-site-iframe-contentwindow.html on main hits the ScriptMsg from closed pipeline for a ScriptMsg::FocusRemoteDocument at

None => return warn!("{}: ScriptMsg from closed pipeline", source_pipeline_id),

which goes away with these changes.

Comment on lines +1763 to +1775
let webview_id = match self
.pipelines
.get(&source_pipeline_id)
.map(|pipeline| pipeline.webview_id)
{
None => {
return warn!(
"{}: DiscardTopLevelBrowsingContext from closed pipeline",
source_pipeline_id
);
},
Some(ctx) => ctx,
};
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks like lot of code duplication, can we do something about it?

Copy link
Copy Markdown
Member

@mrobinson mrobinson Oct 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I recommend a helper at the top of the loop like:

let get_webview_id = || {
    let webview_id = self
        .pipelines
        .get(&source_pipeline_id)
        .map(|pipeline| pipeline.webview_id);
    if webview_id.is_none() {
        warn!(ScriptToConstellationMessage on closed pipeline ({source_pipeline_id})"); 
    }
    webview_id
};

Then in each match arm this could be:

let Some(webview_id) = get_webview_id() else {
    return;
}

@gterzian gterzian force-pushed the prevent_panic_in_message_handling_from_closed_pipeline branch from 90106ff to e618012 Compare October 13, 2025 10:57
@gterzian
Copy link
Copy Markdown
Member Author

@mrobinson @Taym95 Thanks for the review; comments have been addressed.

Note the the new TIMEOUT is dealt with over at #39833

@servo-highfive servo-highfive removed the S-awaiting-review There is new code that needs to be reviewed. label Oct 13, 2025
@gterzian gterzian added this pull request to the merge queue Oct 14, 2025
@servo-highfive servo-highfive added the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Oct 14, 2025
Merged via the queue into servo:main with commit 35ae176 Oct 14, 2025
25 checks passed
@gterzian gterzian deleted the prevent_panic_in_message_handling_from_closed_pipeline branch October 14, 2025 11:14
@servo-highfive servo-highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Oct 14, 2025
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.

Intermittent panic in /html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-1.html

5 participants