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

Unified Diff: src/serialize.cc

Issue 8635011: Introduce short external strings without pointer cache. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 1 month 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: src/serialize.cc
diff --git a/src/serialize.cc b/src/serialize.cc
index e3a84c8c9d3b42e3c18fd87e07a62ed41464af18..d0a1a639f355d88797e3f796a9d424767d2754aa 100644
--- a/src/serialize.cc
+++ b/src/serialize.cc
@@ -669,6 +669,14 @@ void Deserializer::Deserialize() {
isolate_->heap()->set_global_contexts_list(
isolate_->heap()->undefined_value());
+
+ // Update data pointers to the external strings containing natives sources.
+ for (int i = 0; i < Natives::GetBuiltinsCount(); i++) {
+ Object* source = isolate_->heap()->natives_source_cache()->get(i);
+ if (!source->IsUndefined()) {
+ ExternalAsciiString::cast(source)->update_data_cache();
+ }
+ }
}
@@ -1564,7 +1572,6 @@ void Serializer::ObjectSerializer::VisitExternalAsciiString(
sink_->Put(kNativesStringResource, "NativesStringResource");
sink_->PutSection(i, "NativesStringResourceEnd");
bytes_processed_so_far_ += sizeof(resource);
- string->clear_data_cache();
return;
}
}

Powered by Google App Engine
This is Rietveld 408576698