Chromium Code Reviews| Index: runtime/vm/isolate.cc |
| diff --git a/runtime/vm/isolate.cc b/runtime/vm/isolate.cc |
| index c20def45467837153a63515762f8a6c5f22139bb..17b70cab151ec321037e42f92e3ebebddd537016 100644 |
| --- a/runtime/vm/isolate.cc |
| +++ b/runtime/vm/isolate.cc |
| @@ -45,6 +45,7 @@ |
| #include "vm/timeline.h" |
| #include "vm/timeline_analysis.h" |
| #include "vm/timer.h" |
| +#include "vm/verifier.h" |
| #include "vm/visitor.h" |
| @@ -1091,10 +1092,12 @@ void Isolate::ReportReloadError(const Error& error) { |
| void Isolate::ReloadSources(bool test_mode) { |
| + // TODO(asiva): Add verification of canonical objects. |
| ASSERT(!IsReloading()); |
| has_attempted_reload_ = true; |
| reload_context_ = new IsolateReloadContext(this, test_mode); |
| reload_context_->StartReload(); |
| + // TODO(asiva): Add verification of canonical objects. |
| } |
| #endif // !PRODUCT |
| @@ -1492,6 +1495,11 @@ static void ShutdownIsolate(uword parameter) { |
| ASSERT(thread->isolate() == isolate); |
| StackZone zone(thread); |
| HandleScope handle_scope(thread); |
| +#if defined(DEBUG) |
| + isolate->heap()->CollectAllGarbage(); |
| + VerifyCanonicalVisitor check_canonical(thread); |
|
Cutch
2016/07/25 13:51:26
Should this be:
#if defined(DEBUG)
if (!HasAttemp
siva
2016/07/25 21:00:27
Done for now, After fixing the issues I am seeing
|
| + isolate->heap()->IterateObjects(&check_canonical); |
| +#endif // DEBUG |
| const Error& error = Error::Handle(thread->sticky_error()); |
| if (!error.IsNull() && !error.IsUnwindError()) { |
| OS::PrintErr("in ShutdownIsolate: %s\n", error.ToErrorCString()); |