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

Side by Side Diff: mojo/public/cpp/bindings/lib/multiplex_router.cc

Issue 2623263005: Tag some of Mojo heap allocations for the heap profiler. (Closed)
Patch Set: Minor clean-up. 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "mojo/public/cpp/bindings/lib/multiplex_router.h" 5 #include "mojo/public/cpp/bindings/lib/multiplex_router.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 } 348 }
349 349
350 DCHECK(endpoints_.empty()); 350 DCHECK(endpoints_.empty());
351 } 351 }
352 352
353 void MultiplexRouter::SetMasterInterfaceName(const std::string& name) { 353 void MultiplexRouter::SetMasterInterfaceName(const std::string& name) {
354 DCHECK(thread_checker_.CalledOnValidThread()); 354 DCHECK(thread_checker_.CalledOnValidThread());
355 header_validator_->SetDescription(name + " [master] MessageHeaderValidator"); 355 header_validator_->SetDescription(name + " [master] MessageHeaderValidator");
356 control_message_handler_.SetDescription( 356 control_message_handler_.SetDescription(
357 name + " [master] PipeControlMessageHandler"); 357 name + " [master] PipeControlMessageHandler");
358 connector_.SetWatcherHeapProfilerTag(name);
358 } 359 }
359 360
360 void MultiplexRouter::CreateEndpointHandlePair( 361 void MultiplexRouter::CreateEndpointHandlePair(
361 ScopedInterfaceEndpointHandle* local_endpoint, 362 ScopedInterfaceEndpointHandle* local_endpoint,
362 ScopedInterfaceEndpointHandle* remote_endpoint) { 363 ScopedInterfaceEndpointHandle* remote_endpoint) {
363 MayAutoLock locker(lock_.get()); 364 MayAutoLock locker(lock_.get());
364 uint32_t id = 0; 365 uint32_t id = 0;
365 do { 366 do {
366 if (next_interface_id_value_ >= kInterfaceIdNamespaceMask) 367 if (next_interface_id_value_ >= kInterfaceIdNamespaceMask)
367 next_interface_id_value_ = 1; 368 next_interface_id_value_ = 1;
(...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after
912 913
913 void MultiplexRouter::AssertLockAcquired() { 914 void MultiplexRouter::AssertLockAcquired() {
914 #if DCHECK_IS_ON() 915 #if DCHECK_IS_ON()
915 if (lock_) 916 if (lock_)
916 lock_->AssertAcquired(); 917 lock_->AssertAcquired();
917 #endif 918 #endif
918 } 919 }
919 920
920 } // namespace internal 921 } // namespace internal
921 } // namespace mojo 922 } // namespace mojo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698