Skip to content

Commit

Permalink
bind-gen: Apply ToV8Traits to IDL callback function
Browse files Browse the repository at this point in the history
Applies ToV8Traits, a new system to convert a blink value to
a V8 value, to IDL callback function and callback interface.

Also fixes audio-encoder.any.js.
EncodedAudioChunkOutputCallback takes decoder_config as optional.
New ToV8 supports IDLOptional. If the argument for a callback function
is "missing", ToV8 returns undefined, not null.

Bug: 1172074
Change-Id: Ic63a8e4ed89f9d25b86254b1017f10374a19a8d1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2711748
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Hitoshi Yoshida <peria@chromium.org>
Reviewed-by: Yuki Shiino <yukishiino@chromium.org>
Commit-Queue: Canon Mukai <canonmukai@google.com>
Cr-Commit-Position: refs/heads/master@{#857026}
  • Loading branch information
CanonMukai authored and chromium-wpt-export-bot committed Feb 24, 2021
1 parent 78f2b7c commit 4025163
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions webcodecs/audio-encoder.any.js
Expand Up @@ -199,10 +199,10 @@ promise_test(async t => {
// a |config| in it.
output_count++;
if (output_count == 1) {
assert_not_equals(config, null);
assert_equals(typeof config, "object");
decoder_config = config;
} else {
assert_equals(config, null);
assert_equals(config, undefined);
}
}
};
Expand Down

0 comments on commit 4025163

Please sign in to comment.