Skip to content

Should AudioWorkletGlobalScope.registerProcessor() really throw for invalid parameter descriptor values? #2534

@cdumez

Description

@cdumez

Describe the issue

Should AudioWorkletGlobalScope.registerProcessor() really throw for invalid parameter descriptor values?
According to the specification, it should:

WebKit currently implements this. However, it seems Chrome doesn't (I haven't verified but I have been told Firefox doesn't either).
Looking at the Blink code I see the following comment:

// TODO(crbug.com/1078546): The steps 7.3.3 ~ 7.3.6 are missing.

The inconsistent behavior between WebKit and other engines led to the following bug report against WebKit:

The bug reporter also found it confusing that Worklet.addModule() didn't throw even though the worklet script threw an exception but this is the behavior expected by the tests:

See https://wpt.live/worklets/audio-worklet-import.https.html
Subtest: Importing a script which throws should still resolve the given promise.

Not sure what to do here? Should I align WebKit with other browser engines? In which case, we should probably update the specification to match the behavior of browsers. Or should we try to get some buy-in for other browser engines so they align with the specification?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions