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

Unified Diff: src/api.cc

Issue 2740033002: [serializer] complete slack tracking when creating context snapshot. (Closed)
Patch Set: remove unused variable. Created 3 years, 9 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 | « no previous file | src/objects.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index 031ad5a0237ac420731bd4076a74d015666036be..810da61060516ac21150788c9c81cf8648acb974 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -625,6 +625,14 @@ StartupData SnapshotCreator::CreateBlob(
data->contexts_.Clear();
}
+ // Complete in-object slack tracking for all functions.
+ i::HeapIterator heap_iterator(isolate->heap());
+ while (i::HeapObject* current_obj = heap_iterator.next()) {
+ if (!current_obj->IsJSFunction()) continue;
+ i::JSFunction* fun = i::JSFunction::cast(current_obj);
+ fun->CompleteInobjectSlackTrackingIfActive();
+ }
+
#ifdef DEBUG
i::ExternalReferenceTable::instance(isolate)->ResetCount();
#endif // DEBUG
« no previous file with comments | « no previous file | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698