| 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
|
| }
|
|
|
|
|
|
|