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

Unified Diff: mojo/edk/embedder/test_embedder.cc

Issue 1585493002: [mojo] Ports EDK (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
Index: mojo/edk/embedder/test_embedder.cc
diff --git a/mojo/edk/embedder/test_embedder.cc b/mojo/edk/embedder/test_embedder.cc
index 10f50b5d3b538f5c9e840a83a6dfb9ff562849c2..cf02e41596bd2326a2ddaa57177095d67630bd43 100644
--- a/mojo/edk/embedder/test_embedder.cc
+++ b/mojo/edk/embedder/test_embedder.cc
@@ -19,18 +19,12 @@ namespace edk {
namespace internal {
bool ShutdownCheckNoLeaks(Core* core) {
- // No point in taking the lock.
- const HandleTable::HandleToEntryMap& handle_to_entry_map =
- core->handle_table_.handle_to_entry_map_;
-
- if (handle_to_entry_map.empty())
+ std::vector<MojoHandle> leaked_handles;
+ core->GetActiveHandlesForTest(&leaked_handles);
+ if (leaked_handles.empty())
return true;
-
- for (HandleTable::HandleToEntryMap::const_iterator it =
- handle_to_entry_map.begin();
- it != handle_to_entry_map.end(); ++it) {
- LOG(ERROR) << "Mojo embedder shutdown: Leaking handle " << (*it).first;
- }
+ for (auto handle : leaked_handles)
+ LOG(ERROR) << "Mojo embedder shutdown: Leaking handle " << handle;
return false;
}
@@ -48,10 +42,6 @@ bool Shutdown() {
delete internal::g_platform_support;
internal::g_platform_support = nullptr;
- CHECK(internal::g_broker);
- delete internal::g_broker;
- internal::g_broker = nullptr;
-
return rv;
}

Powered by Google App Engine
This is Rietveld 408576698