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

Side by Side Diff: ipc/ipc_channel_proxy.cc

Issue 2188173003: Fix nullptr deref in remote interface acquisition (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
« no previous file with comments | « no previous file | ipc/ipc_message_pipe_reader.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ipc/ipc_channel_proxy.h" 5 #include "ipc/ipc_channel_proxy.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <utility> 10 #include <utility>
(...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after
564 context()->AddGenericAssociatedInterfaceForIOThread(name, factory); 564 context()->AddGenericAssociatedInterfaceForIOThread(name, factory);
565 } 565 }
566 566
567 mojo::AssociatedGroup* ChannelProxy::GetAssociatedGroup() { 567 mojo::AssociatedGroup* ChannelProxy::GetAssociatedGroup() {
568 return context()->associated_group(); 568 return context()->associated_group();
569 } 569 }
570 570
571 void ChannelProxy::GetGenericRemoteAssociatedInterface( 571 void ChannelProxy::GetGenericRemoteAssociatedInterface(
572 const std::string& name, 572 const std::string& name,
573 mojo::ScopedInterfaceEndpointHandle handle) { 573 mojo::ScopedInterfaceEndpointHandle handle) {
574 DCHECK(did_init_);
574 context_->ipc_task_runner()->PostTask( 575 context_->ipc_task_runner()->PostTask(
575 FROM_HERE, base::Bind(&Context::GetRemoteAssociatedInterface, 576 FROM_HERE, base::Bind(&Context::GetRemoteAssociatedInterface,
576 context_.get(), name, base::Passed(&handle))); 577 context_.get(), name, base::Passed(&handle)));
577 } 578 }
578 579
579 void ChannelProxy::ClearIPCTaskRunner() { 580 void ChannelProxy::ClearIPCTaskRunner() {
580 DCHECK(CalledOnValidThread()); 581 DCHECK(CalledOnValidThread());
581 582
582 context()->ClearIPCTaskRunner(); 583 context()->ClearIPCTaskRunner();
583 } 584 }
(...skipping 29 matching lines...) Expand all
613 return channel->TakeClientFileDescriptor(); 614 return channel->TakeClientFileDescriptor();
614 } 615 }
615 #endif 616 #endif
616 617
617 void ChannelProxy::OnChannelInit() { 618 void ChannelProxy::OnChannelInit() {
618 } 619 }
619 620
620 //----------------------------------------------------------------------------- 621 //-----------------------------------------------------------------------------
621 622
622 } // namespace IPC 623 } // namespace IPC
OLDNEW
« no previous file with comments | « no previous file | ipc/ipc_message_pipe_reader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698