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

Unified Diff: vm/raw_object_snapshot.cc

Issue 11443005: Issue - 7123 (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years 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
Index: vm/raw_object_snapshot.cc
===================================================================
--- vm/raw_object_snapshot.cc (revision 15744)
+++ vm/raw_object_snapshot.cc (working copy)
@@ -1607,6 +1607,8 @@
String* str_obj,
intptr_t len,
intptr_t tags,
+ RawString* (*NewSymbol)(const CharacterType* chars,
cshapiro 2012/12/05 20:40:16 s/NewSymbol/new_symbol/ Also, see my comment in t
siva 2012/12/05 23:33:14 Done.
+ intptr_t len),
Snapshot::Kind kind) {
ASSERT(reader != NULL);
if (RawObject::IsCanonical(tags)) {
@@ -1617,7 +1619,7 @@
for (intptr_t i = 0; i < len; i++) {
ptr[i] = reader->Read<CharacterType>();
}
- *str_obj ^= Symbols::NewSymbol(ptr, len);
+ *str_obj ^= (*NewSymbol)(ptr, len);
} else {
// Set up the string object.
*str_obj = StringType::New(len, HEAP_SPACE(kind));
@@ -1653,7 +1655,7 @@
ASSERT((hash == 0) || (String::Hash(str_obj, 0, str_obj.Length()) == hash));
} else {
String::ReadFromImpl<OneByteString, uint8_t>(
- reader, &str_obj, len, tags, kind);
+ reader, &str_obj, len, tags, Symbols::FromLatin1, kind);
}
reader->AddBackRef(object_id, &str_obj, kIsDeserialized);
return raw(str_obj);
@@ -1684,7 +1686,7 @@
ASSERT(String::Hash(str_obj, 0, str_obj.Length()) == hash);
} else {
String::ReadFromImpl<TwoByteString, uint16_t>(
- reader, &str_obj, len, tags, kind);
+ reader, &str_obj, len, tags, Symbols::FromUTF16, kind);
}
reader->AddBackRef(object_id, &str_obj, kIsDeserialized);
return raw(str_obj);

Powered by Google App Engine
This is Rietveld 408576698