Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(653)

Unified Diff: src/factory.h

Issue 2759513002: Remove Factory::NewStringFromASCII method. (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/bootstrapper.h ('k') | src/regexp/regexp-parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/factory.h
diff --git a/src/factory.h b/src/factory.h
index f43fd8f6009afa8004ce9dde495c8147638c1711..2038bf2d10cb93b44f28791e80cc793e84191598 100644
--- a/src/factory.h
+++ b/src/factory.h
@@ -166,29 +166,6 @@ class V8_EXPORT_PRIVATE Factory final {
OneByteVector(str), pretenure).ToHandleChecked();
}
-
- // Allocates and fully initializes a String. There are two String encodings:
- // one-byte and two-byte. One should choose between the threestring
- // allocation functions based on the encoding of the string buffer used to
- // initialized the string.
- // - ...FromOneByte initializes the string from a buffer that is Latin1
- // encoded (it does not check that the buffer is Latin1 encoded) and the
- // result will be Latin1 encoded.
- // - ...FromUTF8 initializes the string from a buffer that is UTF-8
- // encoded. If the characters are all ASCII characters, the result
- // will be Latin1 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 Latin1 characters, the
- // result will be converted to Latin1, otherwise it will be left as
- // two-byte.
-
- // TODO(dcarney): remove this function.
- MUST_USE_RESULT inline MaybeHandle<String> NewStringFromAscii(
- Vector<const char> str,
- PretenureFlag pretenure = NOT_TENURED) {
- return NewStringFromOneByte(Vector<const uint8_t>::cast(str), pretenure);
- }
-
// UTF8 strings are pretenured when used for regexp literal patterns and
// flags in the parser.
MUST_USE_RESULT MaybeHandle<String> NewStringFromUtf8(
« no previous file with comments | « src/bootstrapper.h ('k') | src/regexp/regexp-parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698