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

Unified Diff: runtime/vm/dart_api_impl.cc

Issue 2734853002: Fix assert in app-jit where heap verifier finds ICData (Closed)
Patch Set: 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/dart_api_impl.cc
diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc
index f8db6b46f4e2130457dfdde4edb24ce1dcbc7451..22fd888352b4e49cc8f7af6bc1bf6162d67485a8 100644
--- a/runtime/vm/dart_api_impl.cc
+++ b/runtime/vm/dart_api_impl.cc
@@ -6608,8 +6608,13 @@ Dart_Handle Dart_SaveJITFeedback(uint8_t** buffer, intptr_t* buffer_length) {
DART_EXPORT void Dart_SortClasses() {
DARTSCOPE(Thread::Current());
- ClassFinalizer::SortClasses();
+ // We don't have mechanisms to change class-ids that are embedded in code and
+ // ICData.
ClassFinalizer::ClearAllCode();
+ // Make sure that ICData etc. that have been cleared are also removed from
+ // the heap so that they are not found by the heap verifier.
+ Isolate::Current()->heap()->CollectAllGarbage();
+ ClassFinalizer::SortClasses();
}
DART_EXPORT Dart_Handle
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698