Commit 4f78f114 authored by Hongchan Choi's avatar Hongchan Choi Committed by Commit Bot

Handle the case of detached iframe in RendererWebAudioDeviceImpl

DCHECK in RendererWebAudioDeviceImpl assumes an AudioContext to have
a valid frame ID, and it makes DCHECK-enabled build crash when an
AudioContext is originated from a detached iframe.

This CL loosens the condition of DCHECK to allow such case.

Bug: 954995
Change-Id: I50b577f0e0b466ed76c0d9bbb807cd10adb30acd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1577841Reviewed-by: default avatarGuido Urdaneta <guidou@chromium.org>
Reviewed-by: default avatarHongchan Choi <hongchan@chromium.org>
Commit-Queue: Hongchan Choi <hongchan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#653326}
parent 75cb8841
......@@ -133,7 +133,7 @@ RendererWebAudioDeviceImpl::RendererWebAudioDeviceImpl(
session_id_(session_id),
frame_id_(render_frame_id_cb.Run()) {
DCHECK(client_callback_);
DCHECK_NE(frame_id_, MSG_ROUTING_NONE);
DCHECK(session_id_ == 0 || frame_id_ != MSG_ROUTING_NONE);
media::AudioParameters hardware_params(
device_params_cb.Run(frame_id_, session_id_, std::string()));
......
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