Commit 4765de44 authored by thestig@chromium.org's avatar thestig@chromium.org

Media Galleries: Check for invalid files before passing them to the utility process.

BUG=399030

Review URL: https://codereview.chromium.org/441133003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@287712 0039d316-1c4b-4281-b951-d872f2087c98
parent d35a5f9d
......@@ -56,6 +56,10 @@ void SafeAudioVideoChecker::OnProcessStarted() {
IPC::PlatformFileForTransit file_for_transit =
IPC::TakeFileHandleForProcess(file_.Pass(),
utility_process_host_->GetData().handle);
if (file_for_transit == IPC::InvalidPlatformFileForTransit()) {
OnCheckingFinished(false /* valid? */);
return;
}
const int64 kFileDecodeTimeInMS = 250;
utility_process_host_->Send(new ChromeUtilityMsg_CheckMediaFile(
kFileDecodeTimeInMS, file_for_transit));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment