Skip to content

script: Keep blob URLs alive when creating CORS requests in components/script/css/stylesheet_loader.rs - #48995

Open
elomscansio wants to merge 1 commit into
servo:mainfrom
elomscansio:Keep-blob-URLs-alive-stylesheet_loader-stylesheet_loader
Open

elomscansio wants to merge 1 commit into
servo:mainfrom
elomscansio:Keep-blob-URLs-alive-stylesheet_loader-stylesheet_loader

Conversation

@elomscansio

Copy link
Copy Markdown
Contributor

Use ensure_blob_referenced_by_url_is_kept_alive to claim the blob URL in components/script/css/stylesheet_loader.rs, and switch from create_a_potential_cors_request to create_a_potential_cors_request_with_claim.

Part of #48892

@elomscansio
elomscansio requested a review from gterzian as a code owner October 17, 2026 19:06
@servo-highfive servo-highfive added the S-awaiting-review There is new code that needs to be reviewed. label Oct 17, 2026
@jdm jdm added the T-linux-wpt Do a try run of the WPT label Oct 18, 2026
@github-actions github-actions Bot removed the T-linux-wpt Do a try run of the WPT label Oct 18, 2026
@github-actions

Copy link
Copy Markdown

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

@github-actions

Copy link
Copy Markdown

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

Flaky unexpected result (14)
  • CRASH [expected OK] /_webgl/conformance2/wasm/readpixels-2gb-in-4gb-wasm-memory.html
  • OK [expected ERROR] /css/selectors/invalidation/media-loading-pseudo-classes-in-has.sub.html
    • FAIL [expected PASS] subtest: Test :has(:stalled) invalidation

      assert_implements: :stalled is not supported undefined
      

    • FAIL [expected PASS] subtest: Test :has(:buffering) invalidation

      assert_implements: :buffering is not supported undefined
      

  • TIMEOUT [expected PASS] /dom/nodes/moveBefore/moveBefore-range-iframe-crash.html
  • OK /fetch/content-length/api-and-duplicate-headers.any.html (#35873)
    • FAIL [expected PASS] subtest: fetch() and duplicate Content-Length/Content-Type headers

      promise_test: Unhandled rejection with value: object "TypeError: Network error: HTTP failure: client error (SendRequest)"
      

  • CRASH [expected OK] /html/browsers/browsing-the-web/navigating-across-documents/005.html (#27062)
  • OK /html/browsers/browsing-the-web/navigating-across-documents/refresh/same-document-refresh.html (#34597)
    • PASS [expected FAIL] subtest: Same-Document Referrer from Refresh
  • TIMEOUT /html/browsers/history/the-history-interface/001.html (#12580)
    • PASS [expected FAIL] subtest: traversing history must also traverse hash changes
  • CRASH [expected OK] /html/browsers/history/the-location-interface/assign-replace-from-iframe.html (#47679)
  • CRASH [expected TIMEOUT] /html/browsers/history/the-location-interface/location_replace_session_history.html (#41896)
  • CRASH [expected OK] /html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-nav-window-open.html (#32596)
  • OK /html/semantics/forms/form-submission-0/jsurl-form-submit.tentative.html (#36489)
    • PASS [expected FAIL] subtest: Verifies that form submissions scheduled inside javascript: urls take precedence over the javascript: url's return value.
  • CRASH [expected ERROR] /html/semantics/forms/the-select-element/customizable-select/select-appearance-button-after-span.html
  • TIMEOUT [expected OK] /html/user-activation/navigation-state-reset-sameorigin.html (#45151)
    • TIMEOUT [expected FAIL] subtest: Post-navigation state reset.

      Test timed out
      

  • OK /infrastructure/testdriver/click_iframe.html (#47688)
    • FAIL [expected PASS] subtest: TestDriver click on a document in an iframe

      Unhandled rejection: assert_unreached: click failed Reached unreachable code
      

Stable unexpected results that are known to be intermittent (6)
  • OK /css/css-fonts/variations/at-font-face-font-matching.html (#20684)
    • FAIL [expected PASS] subtest: Matching font-weight: '400' should prefer '501 550' over '502 560'

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

  • OK [expected TIMEOUT] /fetch/api/redirect/redirect-keepalive.https.any.html (#32153)
    • PASS [expected TIMEOUT] subtest: [keepalive][iframe][load] mixed content redirect; setting up
  • TIMEOUT [expected OK] /html/browsers/browsing-the-web/navigating-across-documents/cross-origin-top-navigation-with-user-activation-in-parent.window.html (#48205)
    • TIMEOUT [expected FAIL] subtest: Cross-origin top navigation is blocked without user activation, even if the parent has user activation

      Test timed out
      

  • TIMEOUT [expected OK] /html/browsers/windows/consume-user-activation/window-open-multi-global.html (#47399)
    • TIMEOUT [expected FAIL] subtest: window.open() and consuming user activation with multiple globals in play

      Test timed out
      

  • TIMEOUT /html/semantics/embedded-content/media-elements/autoplay-default-permissions-policy.https.sub.html (#46805)
    • TIMEOUT [expected PASS] subtest: Default "autoplay" feature policy ["self"] allows the top-level document.

      Test timed out
      

  • OK /infrastructure/testdriver/click_window.html (#47303)
    • FAIL [expected PASS] subtest: TestDriver click method in window

      Unhandled rejection: assert_unreached: click failed Reached unreachable code
      

@github-actions

Copy link
Copy Markdown

✨ Try run (#39102083948) succeeded.

@elomscansio

elomscansio commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor Author

…ts/script/css/stylesheet_loader.rs`

Signed-off-by: Emmanuel Paul Elom <[email protected]>
@jdm

jdm commented Oct 20, 2026

Copy link
Copy Markdown
Member

@jdm What should i do for these failing test https://github.com/elomscansio/servo/actions/runs/39123373013

Those are tests that either have inconsistent results (failed one time, passed when run again) or failed multiple times but are known to have intermittent results. You can ignore them.

@jdm jdm left a comment

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.

Let's add a test that:

  • creates a blob containing some CSS
  • creates a blob URL from the blob
  • creates a <link rel=stylesheet> and sets the href to the blob url
  • adds the new element to the document
  • revokes the blob URL
  • adds an onload handler that passes the test and an onerror handler that fails the test

@servo-highfive servo-highfive added S-needs-code-changes Changes have not yet been made that were requested by a reviewer. and removed S-awaiting-review There is new code that needs to be reviewed. labels Oct 20, 2026
@jdm

jdm commented Oct 20, 2026

Copy link
Copy Markdown
Member

@jdm jdm added the S-needs-tests New tests have been requested by a reviewer. label Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-needs-code-changes Changes have not yet been made that were requested by a reviewer. S-needs-tests New tests have been requested by a reviewer.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants