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

Unified Diff: mojo/public/cpp/bindings/lib/multiplex_router.cc

Issue 2623263005: Tag some of Mojo heap allocations for the heap profiler. (Closed)
Patch Set: Addressed comments + fixed build. Created 3 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/public/cpp/bindings/lib/multiplex_router.cc
diff --git a/mojo/public/cpp/bindings/lib/multiplex_router.cc b/mojo/public/cpp/bindings/lib/multiplex_router.cc
index 14ea64740756a9377829c23512a2eb1b7b457603..fd68d86e59973bdc0d86e33c6c4d48e0b57df85b 100644
--- a/mojo/public/cpp/bindings/lib/multiplex_router.cc
+++ b/mojo/public/cpp/bindings/lib/multiplex_router.cc
@@ -350,11 +350,13 @@ MultiplexRouter::~MultiplexRouter() {
DCHECK(endpoints_.empty());
}
-void MultiplexRouter::SetMasterInterfaceName(const std::string& name) {
+void MultiplexRouter::SetMasterInterfaceName(const char* name) {
DCHECK(thread_checker_.CalledOnValidThread());
- header_validator_->SetDescription(name + " [master] MessageHeaderValidator");
+ header_validator_->SetDescription(
+ std::string(name) + " [master] MessageHeaderValidator");
control_message_handler_.SetDescription(
- name + " [master] PipeControlMessageHandler");
+ std::string(name) + " [master] PipeControlMessageHandler");
+ connector_.SetWatcherHeapProfilerTag(name);
}
void MultiplexRouter::CreateEndpointHandlePair(

Powered by Google App Engine
This is Rietveld 408576698