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

[v8.x] src: fix fs.write() externalized string handling #22731

Closed
wants to merge 2 commits into from

Commits on Oct 2, 2018

  1. build: define NOMINMAX on windows

    Build with `-DNOMINMAX` to stop `<windows.h>` from defining macros that
    conflict with `std::min()` and `std::max()`.
    
    PR-URL: nodejs#18216
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
    bnoordhuis authored and addaleax committed Oct 2, 2018
    Copy the full SHA
    89d092e View commit details
    Browse the repository at this point in the history
  2. src: fix fs.write() externalized string handling

    * Respect `encoding` argument when the string is externalized.
    
    * Copy the string when the write request can outlive the externalized
      string.
    
    This commit removes `StringBytes::GetExternalParts()` because it is
    fundamentally broken.
    
    Fixes: nodejs#18146
    Fixes: nodejs#22728
    PR-URL: nodejs#18216
    bnoordhuis authored and addaleax committed Oct 2, 2018
    Copy the full SHA
    590aa1f View commit details
    Browse the repository at this point in the history