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

Unified Diff: src/factory.cc

Issue 10857030: Add basic support for Latin1 to the API. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comments. Created 8 years, 4 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/factory.h ('k') | src/heap.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/factory.cc
diff --git a/src/factory.cc b/src/factory.cc
index 913b75601551593eb93bf5f61a5b4e9567dd4b07..ce113d67b4a6a9b7e283d712b117c624de437b01 100644
--- a/src/factory.cc
+++ b/src/factory.cc
@@ -204,10 +204,23 @@ Handle<String> Factory::NewStringFromAscii(Vector<const char> string,
}
Handle<String> Factory::NewStringFromUtf8(Vector<const char> string,
- PretenureFlag pretenure) {
+ PretenureFlag pretenure,
+ String::AsciiHint ascii_hint) {
CALL_HEAP_FUNCTION(
isolate(),
- isolate()->heap()->AllocateStringFromUtf8(string, pretenure),
+ isolate()->heap()->AllocateStringFromUtf8(
+ string, pretenure, ascii_hint),
+ String);
+}
+
+
+Handle<String> Factory::NewStringFromLatin1(Vector<const char> string,
+ PretenureFlag pretenure,
+ String::AsciiHint ascii_hint) {
+ CALL_HEAP_FUNCTION(
+ isolate(),
+ isolate()->heap()->AllocateStringFromLatin1(
+ string, pretenure, ascii_hint),
String);
}
« no previous file with comments | « src/factory.h ('k') | src/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698