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

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

Issue 728133002: Update mojo sdk to rev e01f9a49449381a5eb430c1fd88bf2cae73ec35a (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: android + ios gyp fixes Created 6 years, 1 month 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 | « mojo/edk/embedder/test_embedder.h ('k') | mojo/edk/js/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/embedder/test_embedder.cc
diff --git a/mojo/edk/embedder/test_embedder.cc b/mojo/edk/embedder/test_embedder.cc
index 95d3be6cdc888a43c83ca9a8843881d63b3d6d0c..defab418e282e155b5401008d3515ce331417279 100644
--- a/mojo/edk/embedder/test_embedder.cc
+++ b/mojo/edk/embedder/test_embedder.cc
@@ -8,9 +8,10 @@
#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "mojo/edk/embedder/embedder.h"
+#include "mojo/edk/embedder/embedder_internal.h"
#include "mojo/edk/embedder/simple_platform_support.h"
+#include "mojo/edk/system/channel_manager.h"
#include "mojo/edk/system/core.h"
-#include "mojo/edk/system/entrypoints.h"
#include "mojo/edk/system/handle_table.h"
namespace mojo {
@@ -18,18 +19,17 @@ namespace mojo {
namespace system {
namespace internal {
-bool ShutdownCheckNoLeaks(Core* core_impl) {
+bool ShutdownCheckNoLeaks(Core* core) {
// No point in taking the lock.
const HandleTable::HandleToEntryMap& handle_to_entry_map =
- core_impl->handle_table_.handle_to_entry_map_;
+ core->handle_table_.handle_to_entry_map_;
if (handle_to_entry_map.empty())
return true;
for (HandleTable::HandleToEntryMap::const_iterator it =
handle_to_entry_map.begin();
- it != handle_to_entry_map.end();
- ++it) {
+ it != handle_to_entry_map.end(); ++it) {
LOG(ERROR) << "Mojo embedder shutdown: Leaking handle " << (*it).first;
}
return false;
@@ -46,12 +46,14 @@ void InitWithSimplePlatformSupport() {
}
bool Shutdown() {
- system::Core* core = system::entrypoints::GetCore();
- CHECK(core);
- system::entrypoints::SetCore(nullptr);
-
- bool rv = system::internal::ShutdownCheckNoLeaks(core);
- delete core;
+ CHECK(internal::g_channel_manager);
+ delete internal::g_channel_manager;
+ internal::g_channel_manager = nullptr;
+
+ CHECK(internal::g_core);
+ bool rv = system::internal::ShutdownCheckNoLeaks(internal::g_core);
+ delete internal::g_core;
+ internal::g_core = nullptr;
return rv;
}
« no previous file with comments | « mojo/edk/embedder/test_embedder.h ('k') | mojo/edk/js/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698