Skip to content

Use stream in file read operation#35969

Merged
Taym95 merged 2 commits intoservo:mainfrom
gterzian:use_stream_in_file_read_operation
Mar 16, 2025
Merged

Use stream in file read operation#35969
Taym95 merged 2 commits intoservo:mainfrom
gterzian:use_stream_in_file_read_operation

Conversation

@gterzian
Copy link
Copy Markdown
Member

@gterzian gterzian commented Mar 14, 2025

Use the stream of the blob in file read operation.


  • There are tests for these changes OR
  • These changes do not require tests because ___

@gterzian gterzian added the T-linux-wpt Do a try run of the WPT label Mar 14, 2025
@github-actions github-actions bot removed the T-linux-wpt Do a try run of the WPT label Mar 14, 2025
@github-actions
Copy link
Copy Markdown

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

@gterzian gterzian force-pushed the use_stream_in_file_read_operation branch from 16e2b37 to 7e97ed7 Compare March 14, 2025 11:14
@gterzian gterzian changed the title Use the stream of the blob in file read operation Use stream in file read operation Mar 14, 2025
@gterzian gterzian force-pushed the use_stream_in_file_read_operation branch from 7e97ed7 to 2dd4a93 Compare March 14, 2025 11:23
@github-actions
Copy link
Copy Markdown

Test results for linux-wpt-layout-2020 from try job (#13855390699):

Flaky unexpected result (18)
  • FAIL [expected PASS] /_mozilla/css/iframe/hide_and_show.html (#15265)
  • TIMEOUT [expected OK] /_webgl/conformance/uniforms/out-of-bounds-uniform-array-access.html (#26225)
    • NOTRUN [expected PASS] subtest: Overall test
  • OK /css/css-fonts/variations/at-font-face-font-matching.html (#20684)
    • FAIL [expected PASS] subtest: Matching font-style: 'oblique -10deg' should prefer 'oblique -50deg -40deg' over 'oblique 0deg 10deg'

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

  • OK [expected TIMEOUT] /css/selectors/media/media-playback-state.html
    • FAIL [expected TIMEOUT] subtest: Test :paused pseudo-classes

      promise_test: Unhandled rejection with value: object "SyntaxError: The string did not match the expected pattern."
      

    • FAIL [expected NOTRUN] subtest: Test :seeking pseudo-class

      promise_test: Unhandled rejection with value: object "SyntaxError: The string did not match the expected pattern."
      

  • OK /custom-elements/form-associated/ElementInternals-setFormValue.html (#29174)
    • PASS [expected FAIL] subtest: Newline normalization - \r\n in FormData value (formdata)
  • OK /encoding/legacy-mb-tchinese/big5/big5-encode-form-errors-extBa.html?1-1000
    • FAIL [expected PASS] subtest: extB (pt 1) U+20000 𠀀 %26%23131072%3B

      assert_equals: expected "%26%23%31%33%31%30%37%32%3B" but got ""
      

    • FAIL [expected PASS] subtest: extB (pt 1) U+20001 𠀁 %26%23131073%3B

      str is undefined
      

    • FAIL [expected PASS] subtest: extB (pt 1) U+20002 𠀂 %26%23131074%3B

      str is undefined
      

    • FAIL [expected PASS] subtest: extB (pt 1) U+20003 𠀃 %26%23131075%3B

      str is undefined
      

    • FAIL [expected PASS] subtest: extB (pt 1) U+20004 𠀄 %26%23131076%3B

      str is undefined
      

    • FAIL [expected PASS] subtest: extB (pt 1) U+20005 𠀅 %26%23131077%3B

      str is undefined
      

    • FAIL [expected PASS] subtest: extB (pt 1) U+20006 𠀆 %26%23131078%3B

      str is undefined
      

    • FAIL [expected PASS] subtest: extB (pt 1) U+20007 𠀇 %26%23131079%3B

      str is undefined
      

    • FAIL [expected PASS] subtest: extB (pt 1) U+20008 𠀈 %26%23131080%3B

      str is undefined
      

    • FAIL [expected PASS] subtest: extB (pt 1) U+20009 𠀉 %26%23131081%3B

      str is undefined
      

    • And 390 more unexpected results...
  • OK /encoding/legacy-mb-tchinese/big5/big5-encode-form-x-x-big5.html?1-1000
    • FAIL [expected PASS] subtest: U+A7 § %A1%B1

      assert_equals: expected "%A1%B1" but got ""
      

    • FAIL [expected PASS] subtest: U+A8 ¨ %C6%D8

      str is undefined
      

    • FAIL [expected PASS] subtest: U+AF ¯ %A1%C2

      str is undefined
      

    • FAIL [expected PASS] subtest: U+B0 ° %A2%58

      str is undefined
      

    • FAIL [expected PASS] subtest: U+B1 ± %A1%D3

      str is undefined
      

    • FAIL [expected PASS] subtest: U+B7 · %A1%50

      str is undefined
      

    • FAIL [expected PASS] subtest: U+D7 × %A1%D1

      str is undefined
      

    • FAIL [expected PASS] subtest: U+F7 ÷ %A1%D2

      str is undefined
      

    • FAIL [expected PASS] subtest: U+F8 ø %C8%FB

      str is undefined
      

    • FAIL [expected PASS] subtest: U+14B ŋ %C8%FC

      str is undefined
      

    • And 390 more unexpected results...
  • OK [expected CRASH] /fetch/api/response/response-stream-with-broken-then.any.html (#35419)
  • 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
  • OK /html/browsers/browsing-the-web/navigating-across-documents/008.html (#24456)
    • FAIL [expected PASS] subtest: Link with onclick form submit to javascript url 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-window-open.html (#28691)
    • PASS [expected FAIL] subtest: load event does not fire on window.open('about:blank')
  • 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
  • OK /html/browsers/browsing-the-web/overlapping-navigations-and-traversals/cross-document-nav-cross-document-nav.html (#29181)
    • PASS [expected FAIL] subtest: cross-document navigation then cross-document navigation
  • TIMEOUT /html/canvas/element/manual/imagebitmap/createImageBitmap-serializable.html (#34120)
    • TIMEOUT [expected FAIL] subtest: Serialize ImageBitmap created from an HTMLVideoElement from a data URL

      Test timed out
      

    • NOTRUN [expected FAIL] subtest: Serialize ImageBitmap created from a bitmap HTMLImageElement
    • NOTRUN [expected FAIL] subtest: Serialize ImageBitmap created from a vector HTMLImageElement
    • NOTRUN [expected TIMEOUT] subtest: Serialize ImageBitmap created from a bitmap SVGImageElement
  • OK /html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-invoke-insert-into-iframe.html
    • FAIL [expected PASS] subtest: NOT invoking resource selection by inserting into other document with src set

      assert_equals: expected 3 but got 1
      

  • TIMEOUT [expected OK] /html/semantics/forms/form-submission-0/form-submit-iframe-then-location-navigate.html (#29634)
    • TIMEOUT [expected FAIL] subtest: Verifies that location navigations take precedence when following form submissions.

      Test timed out
      

  • OK /html/semantics/forms/form-submission-0/text-plain.window.html (#28687)
    • PASS [expected FAIL] subtest: text/plain: Basic test (formdata event)
  • OK [expected TIMEOUT] /performance-timeline/navigation-id-detached-frame.tentative.html (#34773)
    • PASS [expected TIMEOUT] subtest: The navigation_id getter does not crash a window of detached frame
Stable unexpected results that are known to be intermittent (14)
  • 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
      

  • FAIL [expected PASS] /_mozilla/css/dirty_viewport.html (#13731)
  • OK /_webgl/conformance/textures/misc/texture-upload-size.html (#21770)
    • PASS [expected FAIL] subtest: WebGL test #52
    • FAIL [expected PASS] subtest: WebGL test #60

      assert_true: could not create image (SVG) expected true got false
      

  • OK /fetch/metadata/generated/css-font-face.https.sub.tentative.html (#32732)
    • PASS [expected FAIL] subtest: sec-fetch-dest
    • PASS [expected FAIL] subtest: sec-fetch-storage-access - Cross-site
    • PASS [expected FAIL] subtest: sec-fetch-storage-access - Same site
  • FAIL [expected PASS] /html/canvas/element/manual/text/canvas.2d.disconnected.html (#30063)
  • CRASH [expected OK] /html/canvas/offscreen/canvas-host/2d.canvas.host.size.large.html (#34117)
  • 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 /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
  • TIMEOUT /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
  • TIMEOUT [expected OK] /html/semantics/forms/form-submission-0/reparent-form-during-planned-navigation-task.html (#29724)
    • TIMEOUT [expected PASS] subtest: reparent-form-during-planned-navigation-task

      Test timed out
      

  • OK [expected TIMEOUT] /mixed-content/gen/top.http-rp/opt-in/audio-tag.https.html (#35744)
  • OK /navigation-timing/test-navigation-type-reload.html (#33334)
    • FAIL [expected PASS] subtest: Reload domComplete > Original domComplete

      assert_true: Reload domComplete > Original domComplete expected true got false
      

    • FAIL [expected PASS] subtest: Reload domContentLoadedEventEnd > Original domContentLoadedEventEnd

      assert_true: Reload domContentLoadedEventEnd > Original domContentLoadedEventEnd expected true got false
      

    • FAIL [expected PASS] subtest: Reload loadEventEnd > Original loadEventEnd

      assert_true: Reload loadEventEnd > Original loadEventEnd expected true got false
      

    • FAIL [expected PASS] subtest: Reload loadEventStart > Original loadEventStart

      assert_true: Reload loadEventStart > Original loadEventStart expected true got false
      

  • TIMEOUT [expected OK] /resource-timing/nested-context-navigations-iframe.html (#24311)
    • TIMEOUT [expected PASS] subtest: Test that crossorigin iframe navigations are not observable by the parent, even after history navigations by the parent

      Test timed out
      

    • NOTRUN [expected PASS] subtest: Test that cross-site iframe navigations are not observable by the parent, even after history navigations by the parent
    • NOTRUN [expected PASS] subtest: Test that iframe navigations are not observable by the parent
    • NOTRUN [expected PASS] subtest: Test that crossorigin iframe navigations are not observable by the parent
    • NOTRUN [expected PASS] subtest: Test that cross-site iframe navigations are not observable by the parent
    • NOTRUN [expected PASS] subtest: Test that iframe refreshes are not observable by the parent
    • NOTRUN [expected PASS] subtest: Test that crossorigin iframe refreshes are not observable by the parent
    • NOTRUN [expected PASS] subtest: Test that cross-site iframe refreshes are not observable by the parent

@github-actions
Copy link
Copy Markdown

✨ Try run (#13855390699) succeeded.

@gterzian gterzian force-pushed the use_stream_in_file_read_operation branch from 2dd4a93 to edd16ac Compare March 14, 2025 18:44
@gterzian gterzian marked this pull request as ready for review March 14, 2025 18:45
@gterzian gterzian requested a review from Taym95 March 14, 2025 18:45
@gterzian gterzian force-pushed the use_stream_in_file_read_operation branch from edd16ac to 2779bd2 Compare March 14, 2025 18:45
@gterzian
Copy link
Copy Markdown
Member Author

gterzian commented Mar 14, 2025

Note: moving the using the stream and read_all_bytes on the reader, but this probably will have to change to using another mechanism with a hook for chunk steps(in which the progress event would have to be fired). But let's first see how the discussion at w3c/FileAPI#208 concludes before making anything more complicated (added an item at #34676).

@Taym95 ready for review.

I'll do a little fetch integration next by using read_all_bytes to replace the current ConsumeBodyPromiseHandler.

@gterzian gterzian mentioned this pull request Mar 14, 2025
27 tasks
@gterzian gterzian force-pushed the use_stream_in_file_read_operation branch from 2779bd2 to fa2c8ae Compare March 14, 2025 18:54
@Taym95
Copy link
Copy Markdown
Member

Taym95 commented Mar 14, 2025

Note: moving the using the stream and read_all_bytes on the reader, but this probably will have to change to using another mechanism with a hook for chunk steps(in which the progress event would have to be fired). But let's first see how the discussion at w3c/FileAPI#208 concludes before making anything more complicated (added an item at #34676).

@Taym95 ready for review.

I'll do a little fetch integration next by using read_all_bytes to replace the current ConsumeBodyPromiseHandler.

I will review this weekend

Signed-off-by: gterzian <[email protected]>
@gterzian gterzian force-pushed the use_stream_in_file_read_operation branch from 2b6fa66 to 49bb4f4 Compare March 15, 2025 08:29
Copy link
Copy Markdown
Member

@Taym95 Taym95 left a comment

Choose a reason for hiding this comment

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

Clean and neat! I really like how everything is coming together after implementing the stream. 🚀

@Taym95 Taym95 added this pull request to the merge queue Mar 16, 2025
Merged via the queue into servo:main with commit 3ecd1c0 Mar 16, 2025
22 checks passed
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.

2 participants