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

LibWeb: Add and use an ad-hoc ReadableStreamDefaultReader::read_all_chunks AO #24179

Merged
merged 4 commits into from
May 1, 2024

Commits on May 1, 2024

  1. LibWeb: Add an ad-hoc ReadableStreamDefaultReader::read_all_chunks AO

    The ReadableStreamPipeTo AO requires reading all chunks from a stream.
    There actually isn't an AO defined to do that, so the "read all bytes"
    implementation was changed to provide each chunk in a vector in commit
    12cfa08.
    
    This change makes reading all bytes a bit more uncomfortable in normal
    use cases, as we now have to manually join the vector we receive. This
    can also cause churn with huge allocations.
    
    So instead, let's just provide an ad-hoc callback to receive each chunk
    as they arrive.
    trflynn89 committed May 1, 2024
    Configuration menu
    Copy the full SHA
    15da34e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    606be8f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    fd3f8bb View commit details
    Browse the repository at this point in the history
  4. LibWeb: Move the read bytes into ReadLoopReadRequest's success callback

    The callback is already specified to take the bytes by value. No need to
    copy the bytes here.
    trflynn89 committed May 1, 2024
    Configuration menu
    Copy the full SHA
    1e614b1 View commit details
    Browse the repository at this point in the history