joyent/node — pull request #6021 by bnoordhuis (2013-08-09 01:06:59+00:00)
Title: src: use v8::String::NewFrom*() functions

* Change calls to String::New() and String::NewSymbol() to their
respective one-byte, two-byte or UTF-8 counterparts.

* Add a FIXED_ONE_BYTE_STRING macro that takes a string literal and
turns it into a v8::Local.

* Add helper functions that make v8::String::NewFromOneByte() easier to
work with. Said function expects a `const uint8_t*` but almost every
call site deals with `const char*` or `const unsigned char*`.
The helpers help us avoid doing reinterpret_casts all over the place.

* Code that handles file paths uses UTF-8 for backwards compatibility.

CI test.