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

Unified Diff: runtime/vm/isolate.cc

Issue 2201473002: Trun on canonical objects verification after reload (still have one workaround for immutable arrays… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 5 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 | runtime/vm/object.cc » ('j') | runtime/vm/object.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/isolate.cc
diff --git a/runtime/vm/isolate.cc b/runtime/vm/isolate.cc
index 697aef86d87c8180253e0a3e2dff0e2ce41d9520..b2e5dab33511876dbf4219dd01e162a146c17bb6 100644
--- a/runtime/vm/isolate.cc
+++ b/runtime/vm/isolate.cc
@@ -1090,18 +1090,25 @@ void Isolate::ReportReloadError(const Error& error) {
void Isolate::ReloadSources(bool dont_delete_reload_context) {
- // TODO(asiva): Add verification of canonical objects.
ASSERT(!IsReloading());
has_attempted_reload_ = true;
reload_context_ = new IsolateReloadContext(this);
reload_context_->StartReload();
- // TODO(asiva): Add verification of canonical objects.
if (dont_delete_reload_context) {
// Unit tests use the reload context later. Caller is responsible
// for deleting the context.
return;
}
DeleteReloadContext();
+#if defined(DEBUG)
+ {
+ Thread* thread = Thread::Current();
+ Isolate* isolate = thread->isolate();
+ isolate->heap()->CollectAllGarbage();
+ VerifyCanonicalVisitor check_canonical(thread);
+ isolate->heap()->IterateObjects(&check_canonical);
+ }
+#endif // DEBUG
}
« no previous file with comments | « no previous file | runtime/vm/object.cc » ('j') | runtime/vm/object.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698