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

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

Issue 1859063003: [serializer] make snapshot reproducible. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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/snapshot/mksnapshot.cc ('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 4d87c59115c439ebb6642c8e3832f0c505fdd87a..fab01f51f801d4db83f3f48d5d5405cfc86f6f3d 100644
--- a/src/snapshot/startup-serializer.cc
+++ b/src/snapshot/startup-serializer.cc
@@ -113,7 +113,12 @@ void StartupSerializer::SerializeStrongReferences() {
CHECK(HasNotExceededFirstPageOfEachSpace());
serializing_immortal_immovables_roots_ = false;
// Visit the rest of the strong roots.
+ // Clear the stack limits to make the snapshot reproducible.
+ // Reset it again afterwards.
+ isolate->heap()->ClearStackLimits();
isolate->heap()->IterateSmiRoots(this);
+ isolate->heap()->SetStackLimits();
+
isolate->heap()->IterateStrongRoots(this,
VISIT_ONLY_STRONG_FOR_SERIALIZATION);
}
« no previous file with comments | « src/snapshot/mksnapshot.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698