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

Unified Diff: src/snapshot/serializer-common.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/serializer-common.h ('k') | src/snapshot/startup-serializer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/snapshot/serializer-common.cc
diff --git a/src/snapshot/serializer-common.cc b/src/snapshot/serializer-common.cc
index f18879341931465f456bf36095ac0d84262d0375..ca4db7523984c3ea6c96ccb6befce79596237825 100644
--- a/src/snapshot/serializer-common.cc
+++ b/src/snapshot/serializer-common.cc
@@ -21,8 +21,7 @@ ExternalReferenceEncoder::ExternalReferenceEncoder(Isolate* isolate) {
ExternalReferenceTable* table = ExternalReferenceTable::instance(isolate);
for (uint32_t i = 0; i < table->size(); ++i) {
Address addr = table->address(i);
- DCHECK(map_->Get(addr).IsNothing() ||
- strncmp(table->name(i), "Redirect to ", 12) == 0);
+ DCHECK(map_->Get(addr).IsNothing());
map_->Set(addr, i);
DCHECK(map_->Get(addr).IsJust());
}
@@ -81,5 +80,14 @@ bool SerializerDeserializer::CanBeDeferred(HeapObject* o) {
return !o->IsString() && !o->IsScript();
}
+void SerializerDeserializer::RestoreExternalReferenceRedirectors(
+ List<AccessorInfo*>* accessor_infos) {
+ // Restore wiped accessor infos.
+ for (AccessorInfo* info : *accessor_infos) {
+ Foreign::cast(info->js_getter())
+ ->set_foreign_address(info->redirected_getter());
+ }
+}
+
} // namespace internal
} // namespace v8
« no previous file with comments | « src/snapshot/serializer-common.h ('k') | src/snapshot/startup-serializer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698