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

Unified Diff: src/snapshot/serialize.cc

Issue 1099103003: Compact weak fixed arrays before serializing. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fi Created 5 years, 8 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 | « src/objects.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/snapshot/serialize.cc
diff --git a/src/snapshot/serialize.cc b/src/snapshot/serialize.cc
index b7c7dc1dd1c012264705860fd832e087910fc67e..bf0a4eb347b26bd5468d7370b0cb1cde10f39a24 100644
--- a/src/snapshot/serialize.cc
+++ b/src/snapshot/serialize.cc
@@ -1779,6 +1779,13 @@ void Serializer::ObjectSerializer::Serialize() {
// We cannot serialize typed array objects correctly.
DCHECK(!object_->IsJSTypedArray());
+ if (object_->IsPrototypeInfo()) {
+ Object* prototype_users = PrototypeInfo::cast(object_)->prototype_users();
+ if (prototype_users->IsWeakFixedArray()) {
+ WeakFixedArray::cast(prototype_users)->Compact();
+ }
+ }
+
if (object_->IsScript()) {
// Clear cached line ends.
Object* undefined = serializer_->isolate()->heap()->undefined_value();
« no previous file with comments | « src/objects.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698