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

Buffer Use Uint8Array #1825

Closed
wants to merge 7 commits into from
Closed

Commits on May 28, 2015

  1. buffer: allow ARGS_THIS to accept a name

    Allowing the name to be passed to the ARGS_THIS macro will make it
    easier to share code with the Uint8Array implementation.
    trevnorris committed May 28, 2015
    Configuration menu
    Copy the full SHA
    266526c View commit details
    Browse the repository at this point in the history

Commits on Jun 1, 2015

  1. buffer: implement Uint8Array backed Buffer

    With V8 4.4 removing the external array data API currently used by
    Buffer, the new implementation uses the Uint8Array to back Buffer.
    
    Buffers now have a maximum size of Smi::kMaxLength, as defined by V8.
    Which is ~2 GB on 64 bit and ~1 GB on 32 bit.
    
    The flag --use-old-buffer allows using the old Buffer implementation.
    This flag will be removed once V8 4.4 has landed.
    
    The two JS Buffer implementations have been split into two files for
    simplicity.
    
    Use getter to return expected .parent/.offset values for backwards
    compatibility.
    trevnorris committed Jun 1, 2015
    Configuration menu
    Copy the full SHA
    dca709e View commit details
    Browse the repository at this point in the history
  2. buffer: finish implementing FreeCallback

    Passing a FreeCallback to Buffer::New() now uses externalized
    ArrayBuffer's.
    trevnorris committed Jun 1, 2015
    Configuration menu
    Copy the full SHA
    b9fcd80 View commit details
    Browse the repository at this point in the history

Commits on Jun 2, 2015

  1. buffer: switch to using Maybe<> API

    Use the new Maybe<> syntax for v8::Object::SetPrototype().
    trevnorris committed Jun 2, 2015
    Configuration menu
    Copy the full SHA
    05d3341 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d2bcd98 View commit details
    Browse the repository at this point in the history
  3. buffer: update native API

    * Remove the deprecated API.
    * Change Buffer::New() that did a copy of the data to Buffer::Copy()
    * Change Buffer::Use() to Buffer::New()
    trevnorris committed Jun 2, 2015
    Configuration menu
    Copy the full SHA
    0f36e80 View commit details
    Browse the repository at this point in the history
  4. crypto: remove kMaxLength on randomBytes()

    New Buffer implementation allows greater than kMaxLength to be created.
    So instead check if the passed value is a valid Smi.
    trevnorris committed Jun 2, 2015
    Configuration menu
    Copy the full SHA
    a1a8dfb View commit details
    Browse the repository at this point in the history