Commit 210930c9 authored by Adithya Srinivasan's avatar Adithya Srinivasan Committed by Commit Bot

[WebMIDI] Remove call to RenderProcessHost::FromID

Bug: 582328
Change-Id: I733060f119871b3de35c147e6d3eb1d6c83663f1
Reviewed-on: https://chromium-review.googlesource.com/c/1366299Reviewed-by: default avatarTakashi Toyoshima <toyoshim@chromium.org>
Commit-Queue: Takashi Toyoshima <toyoshim@chromium.org>
Cr-Commit-Position: refs/heads/master@{#615434}
parent 1a637e24
...@@ -37,8 +37,8 @@ const size_t kAcknowledgementThresholdBytes = 1024 * 1024; // 1 MB. ...@@ -37,8 +37,8 @@ const size_t kAcknowledgementThresholdBytes = 1024 * 1024; // 1 MB.
using midi::IsDataByte; using midi::IsDataByte;
using midi::IsSystemRealTimeMessage; using midi::IsSystemRealTimeMessage;
using midi::IsValidWebMIDIData; using midi::IsValidWebMIDIData;
using midi::kSysExByte;
using midi::kEndOfSysExByte; using midi::kEndOfSysExByte;
using midi::kSysExByte;
using midi::mojom::PortState; using midi::mojom::PortState;
using midi::mojom::Result; using midi::mojom::Result;
...@@ -188,9 +188,8 @@ void MidiHost::SendData(uint32_t port, ...@@ -188,9 +188,8 @@ void MidiHost::SendData(uint32_t port,
{ {
base::AutoLock auto_lock(output_port_count_lock_); base::AutoLock auto_lock(output_port_count_lock_);
if (output_port_count_ <= port) { if (output_port_count_ <= port) {
bad_message::ReceivedBadMessage( bad_message::ReceivedBadMessage(renderer_process_id_,
RenderProcessHost::FromID(renderer_process_id_), bad_message::MH_INVALID_MIDI_PORT);
bad_message::MH_INVALID_MIDI_PORT);
return; return;
} }
} }
...@@ -202,9 +201,8 @@ void MidiHost::SendData(uint32_t port, ...@@ -202,9 +201,8 @@ void MidiHost::SendData(uint32_t port,
// in JavaScript. The actual permission check for security purposes // in JavaScript. The actual permission check for security purposes
// happens here in the browser process. // happens here in the browser process.
if (!has_sys_ex_permission_ && base::ContainsValue(data, kSysExByte)) { if (!has_sys_ex_permission_ && base::ContainsValue(data, kSysExByte)) {
bad_message::ReceivedBadMessage( bad_message::ReceivedBadMessage(renderer_process_id_,
RenderProcessHost::FromID(renderer_process_id_), bad_message::MH_SYS_EX_PERMISSION);
bad_message::MH_SYS_EX_PERMISSION);
return; 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