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

Unified Diff: src/json-stringifier.h

Issue 23480051: Correctly stringify mixed encoding indirect strings. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 3 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 | « no previous file | test/cctest/test-strings.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/json-stringifier.h
diff --git a/src/json-stringifier.h b/src/json-stringifier.h
index 155ae5ffa9c5a0ca13e27b75ccc31e718e7837c0..0d17b356abb0a1ac1a8447954db81f1386483083 100644
--- a/src/json-stringifier.h
+++ b/src/json-stringifier.h
@@ -835,14 +835,14 @@ Vector<const uc16> BasicJsonStringifier::GetCharVector(Handle<String> string) {
void BasicJsonStringifier::SerializeString(Handle<String> object) {
object = FlattenGetString(object);
if (is_ascii_) {
- if (object->IsOneByteRepresentation()) {
+ if (object->IsOneByteRepresentationUnderneath()) {
SerializeString_<true, uint8_t>(object);
} else {
ChangeEncoding();
SerializeString(object);
}
} else {
- if (object->IsOneByteRepresentation()) {
+ if (object->IsOneByteRepresentationUnderneath()) {
SerializeString_<false, uint8_t>(object);
} else {
SerializeString_<false, uc16>(object);
« no previous file with comments | « no previous file | test/cctest/test-strings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698