Commit 910db416 authored by Johann's avatar Johann Committed by Commit Bot

MidiHost: remove extra sys_ex check

has_sys_ex_permission_ had to be false to get into this branch

Change-Id: If288371ed602532a3e0230aa0dbc13ae3b0bb816
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2404902
Auto-Submit: Johann Koenig <johannkoenig@google.com>
Reviewed-by: default avatarTakashi Toyoshima <toyoshim@chromium.org>
Commit-Queue: Johann Koenig <johannkoenig@google.com>
Cr-Commit-Position: refs/heads/master@{#806832}
parent b0e7ff6a
......@@ -205,15 +205,13 @@ void MidiHost::SendData(uint32_t port,
// Check |has_sys_ex_permission_| first to avoid searching kSysExByte in large
// bulk data transfers for correct uses.
if (!has_sys_ex_permission_ && base::Contains(data, kSysExByte)) {
has_sys_ex_permission_ =
ChildProcessSecurityPolicyImpl::GetInstance()->CanSendMidiSysExMessage(
renderer_process_id_);
if (!has_sys_ex_permission_) {
has_sys_ex_permission_ =
ChildProcessSecurityPolicyImpl::GetInstance()
->CanSendMidiSysExMessage(renderer_process_id_);
if (!has_sys_ex_permission_) {
bad_message::ReceivedBadMessage(renderer_process_id_,
bad_message::MH_SYS_EX_PERMISSION);
return;
}
bad_message::ReceivedBadMessage(renderer_process_id_,
bad_message::MH_SYS_EX_PERMISSION);
return;
}
}
......
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