Commit 7f87a643 authored by Hongchan Choi's avatar Hongchan Choi Committed by Commit Bot

Block null Frame object for Worklet instantiation

Worklet requires a valid Frame object, but GetFrame() from the window
can be nullptr. This CL blocks out such case.

Bug: 792108
Change-Id: Ie3fe64c707447956fcfeac687d4df9f5bf7b26d1
Reviewed-on: https://chromium-review.googlesource.com/809299Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Reviewed-by: default avatarHiroki Nakagawa <nhiroki@chromium.org>
Commit-Queue: Hongchan Choi <hongchan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#521956}
parent 0365acdc
...@@ -151,7 +151,11 @@ void BaseAudioContext::Initialize() { ...@@ -151,7 +151,11 @@ void BaseAudioContext::Initialize() {
if (OriginTrials::audioWorkletEnabled(GetExecutionContext()) || if (OriginTrials::audioWorkletEnabled(GetExecutionContext()) ||
RuntimeEnabledFeatures::AudioWorkletEnabled()) { RuntimeEnabledFeatures::AudioWorkletEnabled()) {
audio_worklet_ = AudioWorklet::Create(this); // Worklet requires a valid Frame object, but GetFrame() from the window
// can be nullptr. Block out such case. See: crbug.com/792108
if (GetExecutionContext()->ExecutingWindow()->GetFrame()) {
audio_worklet_ = AudioWorklet::Create(this);
}
} }
if (destination_node_) { if (destination_node_) {
......
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