Chromium Code Reviews| Index: src/factory.cc |
| diff --git a/src/factory.cc b/src/factory.cc |
| index a4a2be24fa82a5aa8886e6cc606b4a84d6447f71..25d7c4c3d2f2b51f4311a0cb61424dacd38a59bd 100644 |
| --- a/src/factory.cc |
| +++ b/src/factory.cc |
| @@ -205,10 +205,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); |
| } |
| @@ -718,7 +731,8 @@ Handle<String> Factory::EmergencyNewError(const char* type, |
| } else { |
| buffer[kBufferSize - 1] = '\0'; |
| } |
| - Handle<String> error_string = NewStringFromUtf8(CStrVector(buffer), TENURED); |
| + Handle<String> error_string = |
|
Erik Corry
2012/08/10 11:28:51
Inadvertent edit?
Yang
2012/08/10 13:14:45
Yes.
Done.
|
| + NewStringFromUtf8(CStrVector(buffer), TENURED); |
| return error_string; |
| } |