Commit 1ea0066e authored by Hitoshi Yoshida's avatar Hitoshi Yoshida Committed by Commit Bot

CodeGen: Fix webtests and compile failures with new IDL dictionary

After shipping the new code generator for IDL dictionaries,
some tests fail with accessing missing dictionary members.
This CL fixes them.



Bug: 839389
Change-Id: I0d09a4c73edaf5f3195872f21cefe93a65970a40
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2310272Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Commit-Queue: Hitoshi Yoshida <peria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#791740}
parent 2d00ae55
......@@ -1053,8 +1053,7 @@ void MediaCapabilities::GetPerfInfo(
if (!execution_context || execution_context->IsContextDestroyed())
return;
const VideoConfiguration* video_config = decoding_config->video();
if (!video_config) {
if (!decoding_config->hasVideo()) {
// Audio-only is always smooth and power efficient.
MediaCapabilitiesDecodingInfo* info = CreateDecodingInfoWith(true);
info->setKeySystemAccess(access);
......@@ -1062,6 +1061,7 @@ void MediaCapabilities::GetPerfInfo(
return;
}
const VideoConfiguration* video_config = decoding_config->video();
String key_system = "";
bool use_hw_secure_codecs = false;
......@@ -1188,7 +1188,7 @@ void MediaCapabilities::GetGpuFactoriesSupport(
// A few things aren't known until demuxing time. These include: coded size,
// visible rect, and extra data. Make reasonable guesses below. Ideally the
// differences won't be make/break GPU acceleration support.
VideoConfiguration* video_config = decoding_config->video();
const VideoConfiguration* video_config = decoding_config->video();
gfx::Size natural_size(video_config->width(), video_config->height());
media::VideoDecoderConfig config(
video_codec, video_profile, alpha_mode, video_color_space,
......
......@@ -42,9 +42,10 @@ DecoderTemplate<Traits>::DecoderTemplate(ScriptState* script_state,
ExceptionState& exception_state)
: script_state_(script_state) {
DVLOG(1) << __func__;
// TODO(crbug.com/1070871): Use fooOr(nullptr).
// TODO(sandersd): Is it an error to not provide all callbacks?
output_cb_ = init->output();
error_cb_ = init->error();
output_cb_ = init->hasOutput() ? init->output() : nullptr;
error_cb_ = init->hasError() ? init->error() : nullptr;
}
template <typename Traits>
......
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