DescriptionAdd check on invalid file descriptor at both broker and renderer sides.
The broker could send back an invalide channel handle if it fails to setup up renderer channel, e.g. when the broker fails to duplicate a file descriptor. Add a check in PpapiThread::SetupRendererChannel on this condition. Upon receiving an invalid channel handle from the broker, the BrokerDispatcherWrapper at the render side should check the channel handle before passing it down. Using an invalid channel handle to create a channel may cause LOG(FATAL) in IPC::Channel::ChannelImpl::CreatePipe().
Add a content unitest to check this.
BUG=103957
TEST=new unit test
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=109747
Patch Set 1 #
Total comments: 10
Patch Set 2 : Made the test fixture much simpler. #
Total comments: 8
Patch Set 3 : Change comment about the mock_process_. #
Total comments: 2
Patch Set 4 : Adding check in HostDispatcherWrapper. Adding a positive test also. #
Total comments: 16
Patch Set 5 : Split failure and success cases to two different tests. #
Total comments: 6
Patch Set 6 : Fix indents/typo/format issues. #Patch Set 7 : Synced and resolved conflict. #
Messages
Total messages: 18 (0 generated)
|