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

src: rename IsAnyByteSource to IsAnyBufferSource #49346

Merged
merged 1 commit into from
Aug 29, 2023

Commits on Aug 27, 2023

  1. src: rename IsAnyByteSource to IsAnyBufferSource

    The current name is somewhat confusing. There is an internal ByteSource
    class, which is entirely unrelated to what IsAnyByteSource() does, even
    though both exist in the crypto subsystem of the C++ code. ByteSource
    objects can also be constructed from strings, for example, for which
    IsAnyByteSource() returns false.
    
    Web IDL calls the types for which this function returns true
    BufferSource. This type is commonly used across Web Crypto, for example.
    Thus, rename the function to match the Web IDL naming.
    
    Because the function also appears to accept BufferSource objects backed
    by SharedArrayBuffer instances, the exact Web IDL name would be
    AllowSharedBufferSource, but that seems unnecessarily long, so I decided
    to stick with "any".
    tniessen committed Aug 27, 2023
    Configuration menu
    Copy the full SHA
    9a5ab2b View commit details
    Browse the repository at this point in the history