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

Unified Diff: src/snapshot/startup-serializer.cc

Issue 2561783002: [serializer] wipe simulator redirects for accessor infos. (Closed)
Patch Set: fix Created 4 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
« no previous file with comments | « src/snapshot/startup-serializer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/snapshot/startup-serializer.cc
diff --git a/src/snapshot/startup-serializer.cc b/src/snapshot/startup-serializer.cc
index 80598e80bd04aa30a6b0c949feb8df69a7a53a44..35e62403fb53f8cfa9b93726fbca736dc7c02d9c 100644
--- a/src/snapshot/startup-serializer.cc
+++ b/src/snapshot/startup-serializer.cc
@@ -21,6 +21,7 @@ StartupSerializer::StartupSerializer(
}
StartupSerializer::~StartupSerializer() {
+ RestoreExternalReferenceRedirectors(&accessor_infos_);
OutputStatistics("StartupSerializer");
}
@@ -66,6 +67,14 @@ void StartupSerializer::SerializeObject(HeapObject* obj, HowToCode how_to_code,
FlushSkip(skip);
+ if (isolate_->external_reference_redirector() && obj->IsAccessorInfo()) {
+ // Wipe external reference redirects in the accessor info.
+ AccessorInfo* info = AccessorInfo::cast(obj);
+ Address original_address = Foreign::cast(info->getter())->foreign_address();
+ Foreign::cast(info->js_getter())->set_foreign_address(original_address);
+ accessor_infos_.Add(info);
+ }
+
// Object has not yet been serialized. Serialize it here.
ObjectSerializer object_serializer(this, obj, &sink_, how_to_code,
where_to_point);
« no previous file with comments | « src/snapshot/startup-serializer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698