Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(239)

Issue 2727733002: Implement AudioWorkletProcessor interface (Closed)

Created:
3 years, 9 months ago by hongchan
Modified:
3 years, 9 months ago
CC:
chromium-reviews, shimazu+worker_chromium.org, kinuko+worker_chromium.org, Raymond Toy, blink-reviews, horo+watch_chromium.org, falken+watch_chromium.org, blink-worker-reviews_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Implement AudioWorkletProcessor interface This CL add the actual implementation of AudioWorkletProcessor and AudioWorkletGlobaScope, plus a basic unit test for the AWGS. - AudioWorkletGlobalScope::registerProcessor() - IDL: AudioWorkletGlobalScope, AudioWorkletProcessor - AudioWorkletProcessorDefinition class This CL does NOT include the activation of AudioWorkletGlobalScope, which requires comprehensive changes in AudioContext, AudioDestination and AudioWorkletThread. BUG=695219 TEST=AudioWorkletGlobalScopeTest.cpp Review-Url: https://codereview.chromium.org/2727733002 Cr-Commit-Position: refs/heads/master@{#458143} Committed: https://chromium.googlesource.com/chromium/src/+/71cd36fffa8aad850e1829ca71d9b807590a782e

Patch Set 1 : Added AudioWorkletProcessor and AudioWorkletProcessorDefinition classes #

Total comments: 23

Patch Set 2 : Addressing feedback #

Total comments: 4

Patch Set 3 : Refactored AudioWorkletGlobalScope to centralize V8 operation #

Total comments: 28

Patch Set 4 : Added AudioWorkletGlobalScopeTest.cpp #

Total comments: 31

Patch Set 5 : Added more unit test for parsing #

Total comments: 35

Patch Set 6 : Addressing feedback from rtoy@ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+725 lines, -4 lines) Patch
M third_party/WebKit/Source/core/workers/ThreadedMessagingProxyBase.h View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/workers/ThreadedMessagingProxyBase.cpp View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/workers/ThreadedWorkletGlobalScope.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/modules/BUILD.gn View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/webaudio/AudioWorkletGlobalScope.h View 1 2 3 4 5 3 chunks +39 lines, -1 line 0 comments Download
M third_party/WebKit/Source/modules/webaudio/AudioWorkletGlobalScope.cpp View 1 2 3 4 5 2 chunks +159 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/webaudio/AudioWorkletGlobalScope.idl View 1 2 3 1 chunk +1 line, -2 lines 0 comments Download
A third_party/WebKit/Source/modules/webaudio/AudioWorkletGlobalScopeTest.cpp View 1 2 3 4 5 1 chunk +291 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/modules/webaudio/AudioWorkletProcessor.h View 1 2 3 4 1 chunk +54 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/modules/webaudio/AudioWorkletProcessor.cpp View 1 2 3 4 5 1 chunk +51 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/modules/webaudio/AudioWorkletProcessor.idl View 1 1 chunk +16 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/modules/webaudio/AudioWorkletProcessorDefinition.h View 1 2 3 4 1 chunk +59 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/modules/webaudio/AudioWorkletProcessorDefinition.cpp View 1 2 3 1 chunk +42 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/webaudio/BUILD.gn View 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 51 (23 generated)
Raymond Toy
https://codereview.chromium.org/2727733002/diff/1/third_party/WebKit/Source/modules/webaudio/AudioWorkletProcessor.cpp File third_party/WebKit/Source/modules/webaudio/AudioWorkletProcessor.cpp (right): https://codereview.chromium.org/2727733002/diff/1/third_party/WebKit/Source/modules/webaudio/AudioWorkletProcessor.cpp#newcode35 third_party/WebKit/Source/modules/webaudio/AudioWorkletProcessor.cpp:35: bool AudioWorkletProcessor::process(/* inputs, outputs, parameters */) { What is ...
3 years, 9 months ago (2017-03-01 21:52:55 UTC) #3
hongchan
Please disregard the CL until it's ready. I pressed the "edit issue" button but it ...
3 years, 9 months ago (2017-03-01 22:06:11 UTC) #4
hongchan
PTAL at the general approach. I tried to follow the pattern from PaintWorklet and CSSPaintDefinition, ...
3 years, 9 months ago (2017-03-03 19:02:39 UTC) #12
nhiroki
Looks good overall from the worker infra's pov. https://codereview.chromium.org/2727733002/diff/20001/third_party/WebKit/Source/modules/webaudio/AudioWorkletGlobalScope.cpp File third_party/WebKit/Source/modules/webaudio/AudioWorkletGlobalScope.cpp (right): https://codereview.chromium.org/2727733002/diff/20001/third_party/WebKit/Source/modules/webaudio/AudioWorkletGlobalScope.cpp#newcode47 third_party/WebKit/Source/modules/webaudio/AudioWorkletGlobalScope.cpp:47: ExceptionState& ...
3 years, 9 months ago (2017-03-06 10:08:46 UTC) #13
nhiroki
On 2017/03/03 19:02:39, hongchan wrote: > PTAL at the general approach. > > I tried ...
3 years, 9 months ago (2017-03-06 10:14:30 UTC) #15
haraken
I'd like to put as many V8 related things in AudioWorkletGlobalScope as possible (and probably ...
3 years, 9 months ago (2017-03-06 11:51:12 UTC) #16
ikilpatrick
On 2017/03/06 11:51:12, haraken wrote: > I'd like to put as many V8 related things ...
3 years, 9 months ago (2017-03-06 17:57:33 UTC) #17
hongchan
Thanks for the review on rough draft. Here are some notes from my point of ...
3 years, 9 months ago (2017-03-06 20:06:12 UTC) #18
haraken
https://codereview.chromium.org/2727733002/diff/20001/third_party/WebKit/Source/modules/webaudio/AudioWorkletProcessorDefinition.h File third_party/WebKit/Source/modules/webaudio/AudioWorkletProcessorDefinition.h (right): https://codereview.chromium.org/2727733002/diff/20001/third_party/WebKit/Source/modules/webaudio/AudioWorkletProcessorDefinition.h#newcode48 third_party/WebKit/Source/modules/webaudio/AudioWorkletProcessorDefinition.h:48: RefPtr<ScriptState> m_scriptState; On 2017/03/06 20:06:12, hongchan wrote: > On ...
3 years, 9 months ago (2017-03-06 20:49:44 UTC) #19
ikilpatrick
On 2017/03/06 20:49:44, haraken wrote: > https://codereview.chromium.org/2727733002/diff/20001/third_party/WebKit/Source/modules/webaudio/AudioWorkletProcessorDefinition.h > File > third_party/WebKit/Source/modules/webaudio/AudioWorkletProcessorDefinition.h > (right): > > ...
3 years, 9 months ago (2017-03-07 22:41:47 UTC) #20
haraken
On 2017/03/07 22:41:47, ikilpatrick wrote: > On 2017/03/06 20:49:44, haraken wrote: > > > https://codereview.chromium.org/2727733002/diff/20001/third_party/WebKit/Source/modules/webaudio/AudioWorkletProcessorDefinition.h ...
3 years, 9 months ago (2017-03-08 09:50:26 UTC) #21
haraken
The overall design looks good. https://codereview.chromium.org/2727733002/diff/40001/third_party/WebKit/Source/modules/webaudio/AudioWorkletGlobalScope.cpp File third_party/WebKit/Source/modules/webaudio/AudioWorkletGlobalScope.cpp (right): https://codereview.chromium.org/2727733002/diff/40001/third_party/WebKit/Source/modules/webaudio/AudioWorkletGlobalScope.cpp#newcode91 third_party/WebKit/Source/modules/webaudio/AudioWorkletGlobalScope.cpp:91: if (!v8Call(prototype->Get(context, v8String(isolate, "process")), ...
3 years, 9 months ago (2017-03-08 09:57:20 UTC) #22
hongchan
To help the understanding of how all these related, I wrote a small design doc. ...
3 years, 9 months ago (2017-03-08 19:38:47 UTC) #23
ikilpatrick
lgtm https://codereview.chromium.org/2727733002/diff/60001/third_party/WebKit/Source/modules/webaudio/AudioWorkletGlobalScope.cpp File third_party/WebKit/Source/modules/webaudio/AudioWorkletGlobalScope.cpp (right): https://codereview.chromium.org/2727733002/diff/60001/third_party/WebKit/Source/modules/webaudio/AudioWorkletGlobalScope.cpp#newcode44 third_party/WebKit/Source/modules/webaudio/AudioWorkletGlobalScope.cpp:44: void AudioWorkletGlobalScope::dispose() { DCHECK(isContextThread()) ? https://codereview.chromium.org/2727733002/diff/60001/third_party/WebKit/Source/modules/webaudio/AudioWorkletGlobalScope.cpp#newcode135 third_party/WebKit/Source/modules/webaudio/AudioWorkletGlobalScope.cpp:135: definition->constructorLocal(isolate)) ...
3 years, 9 months ago (2017-03-09 21:45:23 UTC) #25
haraken
Mostly looks good. https://codereview.chromium.org/2727733002/diff/60001/third_party/WebKit/Source/modules/webaudio/AudioWorkletGlobalScope.cpp File third_party/WebKit/Source/modules/webaudio/AudioWorkletGlobalScope.cpp (right): https://codereview.chromium.org/2727733002/diff/60001/third_party/WebKit/Source/modules/webaudio/AudioWorkletGlobalScope.cpp#newcode45 third_party/WebKit/Source/modules/webaudio/AudioWorkletGlobalScope.cpp:45: m_processorDefinitionMap.clear(); Should we also clear m_processorInstances ...
3 years, 9 months ago (2017-03-10 13:43:22 UTC) #26
nhiroki
https://codereview.chromium.org/2727733002/diff/60001/third_party/WebKit/Source/core/workers/ThreadedMessagingProxyBase.h File third_party/WebKit/Source/core/workers/ThreadedMessagingProxyBase.h (right): https://codereview.chromium.org/2727733002/diff/60001/third_party/WebKit/Source/core/workers/ThreadedMessagingProxyBase.h#newcode21 third_party/WebKit/Source/core/workers/ThreadedMessagingProxyBase.h:21: class WorkerReportingProxy; unused? https://codereview.chromium.org/2727733002/diff/60001/third_party/WebKit/Source/modules/webaudio/AudioWorkletGlobalScope.h File third_party/WebKit/Source/modules/webaudio/AudioWorkletGlobalScope.h (right): https://codereview.chromium.org/2727733002/diff/60001/third_party/WebKit/Source/modules/webaudio/AudioWorkletGlobalScope.h#newcode40 third_party/WebKit/Source/modules/webaudio/AudioWorkletGlobalScope.h:40: ...
3 years, 9 months ago (2017-03-10 15:30:13 UTC) #27
hongchan
PTAL at the new unit test. I am testing two things: (1) A basic assertion ...
3 years, 9 months ago (2017-03-15 22:30:18 UTC) #29
nhiroki
LGTM! https://codereview.chromium.org/2727733002/diff/100001/third_party/WebKit/Source/modules/webaudio/AudioWorkletGlobalScope.cpp File third_party/WebKit/Source/modules/webaudio/AudioWorkletGlobalScope.cpp (right): https://codereview.chromium.org/2727733002/diff/100001/third_party/WebKit/Source/modules/webaudio/AudioWorkletGlobalScope.cpp#newcode65 third_party/WebKit/Source/modules/webaudio/AudioWorkletGlobalScope.cpp:65: exceptionState.throwTypeError("The empty string is not a valid name."); ...
3 years, 9 months ago (2017-03-16 00:21:36 UTC) #30
haraken
LGTM https://codereview.chromium.org/2727733002/diff/100001/third_party/WebKit/Source/modules/webaudio/AudioWorkletGlobalScope.cpp File third_party/WebKit/Source/modules/webaudio/AudioWorkletGlobalScope.cpp (right): https://codereview.chromium.org/2727733002/diff/100001/third_party/WebKit/Source/modules/webaudio/AudioWorkletGlobalScope.cpp#newcode80 third_party/WebKit/Source/modules/webaudio/AudioWorkletGlobalScope.cpp:80: prototypeValue)) On 2017/03/16 00:21:35, nhiroki (slow) wrote: > ...
3 years, 9 months ago (2017-03-16 12:07:15 UTC) #31
ikilpatrick
lgtm https://codereview.chromium.org/2727733002/diff/100001/third_party/WebKit/Source/modules/webaudio/AudioWorkletGlobalScope.h File third_party/WebKit/Source/modules/webaudio/AudioWorkletGlobalScope.h (right): https://codereview.chromium.org/2727733002/diff/100001/third_party/WebKit/Source/modules/webaudio/AudioWorkletGlobalScope.h#newcode40 third_party/WebKit/Source/modules/webaudio/AudioWorkletGlobalScope.h:40: // function may return nullptr. maybe just comment ...
3 years, 9 months ago (2017-03-16 18:27:39 UTC) #32
hongchan
wrt "GetPrototype()" method, it just doesn't work. The following code renders |prototypeValue| into the invalid ...
3 years, 9 months ago (2017-03-16 22:11:29 UTC) #33
haraken
+yukishiino for the GetPrototype issue. See #33.
3 years, 9 months ago (2017-03-17 09:17:12 UTC) #40
Yuki
On 2017/03/17 09:17:12, haraken wrote: > +yukishiino for the GetPrototype issue. See #33. I don't ...
3 years, 9 months ago (2017-03-17 09:51:59 UTC) #41
hongchan
On 2017/03/17 09:51:59, Yuki wrote: > On 2017/03/17 09:17:12, haraken wrote: > > +yukishiino for ...
3 years, 9 months ago (2017-03-17 15:37:02 UTC) #42
Raymond Toy
lgtm with nits https://codereview.chromium.org/2727733002/diff/120001/third_party/WebKit/Source/modules/webaudio/AudioWorkletGlobalScope.cpp File third_party/WebKit/Source/modules/webaudio/AudioWorkletGlobalScope.cpp (right): https://codereview.chromium.org/2727733002/diff/120001/third_party/WebKit/Source/modules/webaudio/AudioWorkletGlobalScope.cpp#newcode64 third_party/WebKit/Source/modules/webaudio/AudioWorkletGlobalScope.cpp:64: if (name.isEmpty()) { I think this ...
3 years, 9 months ago (2017-03-17 16:45:32 UTC) #43
hongchan
Thanks all for the review! https://codereview.chromium.org/2727733002/diff/120001/third_party/WebKit/Source/modules/webaudio/AudioWorkletGlobalScope.cpp File third_party/WebKit/Source/modules/webaudio/AudioWorkletGlobalScope.cpp (right): https://codereview.chromium.org/2727733002/diff/120001/third_party/WebKit/Source/modules/webaudio/AudioWorkletGlobalScope.cpp#newcode64 third_party/WebKit/Source/modules/webaudio/AudioWorkletGlobalScope.cpp:64: if (name.isEmpty()) { On ...
3 years, 9 months ago (2017-03-20 17:03:32 UTC) #46
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2727733002/140001
3 years, 9 months ago (2017-03-20 17:03:39 UTC) #47
commit-bot: I haz the power
3 years, 9 months ago (2017-03-20 19:12:03 UTC) #51
Message was sent while issue was closed.
Committed patchset #6 (id:140001) as
https://chromium.googlesource.com/chromium/src/+/71cd36fffa8aad850e1829ca71d9...

Powered by Google App Engine
This is Rietveld 408576698