| Index: src/factory.h
|
| diff --git a/src/factory.h b/src/factory.h
|
| index 7ef8911d702e4add0260ca2d4c2073e4ac354d5a..e22ea8d323d4aa45ff1f1bd8bbe2b1d268511c69 100644
|
| --- a/src/factory.h
|
| +++ b/src/factory.h
|
| @@ -122,6 +122,23 @@ class Factory V8_FINAL {
|
| OneByteVector(str), pretenure).ToHandleChecked();
|
| }
|
|
|
| +
|
| + // Allocates and fully initializes a String. There are two String
|
| + // encodings: ASCII and two byte. One should choose between the three string
|
| + // allocation functions based on the encoding of the string buffer used to
|
| + // initialized the string.
|
| + // - ...FromAscii initializes the string from a buffer that is ASCII
|
| + // encoded (it does not check that the buffer is ASCII encoded) and the
|
| + // result will be ASCII encoded.
|
| + // - ...FromUTF8 initializes the string from a buffer that is UTF-8
|
| + // encoded. If the characters are all single-byte characters, the
|
| + // result will be ASCII encoded, otherwise it will converted to two
|
| + // byte.
|
| + // - ...FromTwoByte initializes the string from a buffer that is two-byte
|
| + // encoded. If the characters are all single-byte characters, the
|
| + // result will be converted to ASCII, otherwise it will be left as
|
| + // two-byte.
|
| +
|
| // TODO(dcarney): remove this function.
|
| MUST_USE_RESULT inline MaybeHandle<String> NewStringFromAscii(
|
| Vector<const char> str,
|
|
|