Add implementation for AudioWorkletGlobalScope.registerProcessor(): - https://www.w3.org/TR/webaudio/#dom-audioworkletglobalscope-registerprocessor
Created attachment 410693 [details] Patch
Comment on attachment 410693 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=410693&action=review r=me > Source/WebCore/Modules/webaudio/AudioWorkletGlobalScope.cpp:70 > + JSC::JSObject* jsConstructor = processorContructor->callbackData()->callback(); > + auto* globalObject = jsConstructor->globalObject(); > + auto& vm = globalObject->vm(); > + auto scope = DECLARE_THROW_SCOPE(vm); Does an audio worklet always execute on the same non-main thread?
(In reply to Geoffrey Garen from comment #2) > Comment on attachment 410693 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=410693&action=review > > r=me > > > Source/WebCore/Modules/webaudio/AudioWorkletGlobalScope.cpp:70 > > + JSC::JSObject* jsConstructor = processorContructor->callbackData()->callback(); > > + auto* globalObject = jsConstructor->globalObject(); > > + auto& vm = globalObject->vm(); > > + auto scope = DECLARE_THROW_SCOPE(vm); > > Does an audio worklet always execute on the same non-main thread? Yes it does.
(In reply to Chris Dumez from comment #3) > (In reply to Geoffrey Garen from comment #2) > > Comment on attachment 410693 [details] > > Patch > > > > View in context: > > https://bugs.webkit.org/attachment.cgi?id=410693&action=review > > > > r=me > > > > > Source/WebCore/Modules/webaudio/AudioWorkletGlobalScope.cpp:70 > > > + JSC::JSObject* jsConstructor = processorContructor->callbackData()->callback(); > > > + auto* globalObject = jsConstructor->globalObject(); > > > + auto& vm = globalObject->vm(); > > > + auto scope = DECLARE_THROW_SCOPE(vm); > > > > Does an audio worklet always execute on the same non-main thread? > > Yes it does. Why the question? Would you like me to tighten the assertion to make sure we're always running on the Worklet thread instead of simply checking we're not on the main thread?
Created attachment 410707 [details] Patch
Created attachment 410708 [details] Patch
Created attachment 410710 [details] Patch
ChangeLog entry in LayoutTests/imported/w3c/ChangeLog contains OOPS!.
Created attachment 410713 [details] Patch
Committed r268103: <https://trac.webkit.org/changeset/268103> All reviewed patches have been landed. Closing bug and clearing flags on attachment 410713 [details].
<rdar://problem/70025532>