New issue
Advanced search Search tips

Issue 799092 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Jan 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac
Pri: 1
Type: Bug



Sign in to add a comment

[audioworklet] Origin Trial does not activate AudioWorklet correctly

Project Member Reported by hongchan@chromium.org, Jan 4 2018

Issue description

Even with a valid token, AudioWorklet is not activated as shown in the documentation.
 
More context on the problems here.

First problem was that origin trial tokens were not processed in WorkletGlobalScope. This was first addressed in patch 2, here:
https://chromium-review.googlesource.com/c/chromium/src/+/849254/2

With these changes, the layout test in the above CL would fail with the runtime flag disabled for AudioWorklet. The main problem seemed to be with this code in the test:
  realtimeContext.audioWorklet.addModule('../../webaudio/audio-worklet/dummy-processor.js')

Which results in this error:
Uncaught ReferenceError: AudioWorkletProcessor is not defined

After investigating, I believe it's a timing problem with when the origin trial bindings are installed. In debugging, it looks like the bindings for AudioWorkletProcessor are installed, but it happens after the addModule() call to create the processor.

Components: Blink>Workers Internals>OriginTrials
Thanks for the information.

I've added more relevant/affected component with this issue. I still believe the CL 849254 should not wait for the resolution of this matter - this is from the interaction  of Worklet infrastructure and Origin Trial framework.
Project Member

Comment 3 by bugdroid1@chromium.org, Jan 5 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d4669e6295fdb410b85d385f20c280ba6bfb1dda

commit d4669e6295fdb410b85d385f20c280ba6bfb1dda
Author: Hongchan Choi <hongchan@chromium.org>
Date: Fri Jan 05 18:17:44 2018

Fix the activation of AudioWorklet Origin Trial

The previous CL [1] does not completely activate the origin trial
framework for AudioWorklet and it needs small fixes to make it work.

[1]: https://chromium-review.googlesource.com/c/chromium/src/+/810892

Bug:  799092 
Change-Id: Iabae27a50b45b88b41b3244c81cbce8abac89684
Reviewed-on: https://chromium-review.googlesource.com/849254
Reviewed-by: Jason Chase <chasej@chromium.org>
Reviewed-by: Raymond Toy <rtoy@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Hongchan Choi <hongchan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#527321}
[add] https://crrev.com/d4669e6295fdb410b85d385f20c280ba6bfb1dda/third_party/WebKit/LayoutTests/http/tests/origin_trials/webexposed/audioworklet-origin-trial-interfaces.html
[modify] https://crrev.com/d4669e6295fdb410b85d385f20c280ba6bfb1dda/third_party/WebKit/Source/modules/webaudio/AudioWorklet.cpp
[modify] https://crrev.com/d4669e6295fdb410b85d385f20c280ba6bfb1dda/third_party/WebKit/Source/modules/webaudio/AudioWorkletProcessor.idl
[modify] https://crrev.com/d4669e6295fdb410b85d385f20c280ba6bfb1dda/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp
[modify] https://crrev.com/d4669e6295fdb410b85d385f20c280ba6bfb1dda/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.idl
[modify] https://crrev.com/d4669e6295fdb410b85d385f20c280ba6bfb1dda/third_party/WebKit/Source/platform/audio/AudioDestination.cpp

Owner: cha...@chromium.org
Status: Assigned (was: Started)
The patch for AudioWorklet part has been landed, but the OT support for Worklet infrastructure still needs to be done. For that, I am reassigning this issue to the Origin Trial owner.
Labels: -Pri-1 -M-64 M-65 Pri-2
Changing priority and milestone, given the urgent issue for the AudioWorklet trial has been addressed.
Labels: -Pri-2 -M-65 M-64 Merge-Request-64 Pri-1
Owner: hongchan@chromium.org
Status: Verified (was: Assigned)
chasej@

I am changing the status to "Verified" for the moment so we can merge this CL to M64. Once we finishes the merge, I will reassign this to Origin Trial team (chasej@).

Sorry for the confusion!
Project Member

Comment 7 by sheriffbot@chromium.org, Jan 8 2018

Labels: -Merge-Request-64 Hotlist-Merge-Review Merge-Review-64
This bug requires manual review: M64 has already been promoted to the beta branch, so this requires manual review
Please contact the milestone owner if you have questions.
Owners: cmasso@(Android), cmasso@(iOS), kbleicher@(ChromeOS), abdulsyed@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
hongchan@

To simplify tracking, I've created a separate  bug 799960 . This bug can now be used just to track the immediate fix already landed.
Please add affected OSs.
Labels: OS-Android OS-Chrome OS-Linux OS-Mac OS-Windows
Can you provide the rational as to why this should be merged into M64 at this point in the release cycle? What is the risk associated with merging this change?
Labels: -Merge-Review-64 Merge-Approved-64
As per email discussion, approving merge for M64. Branch:3282
Project Member

Comment 13 by bugdroid1@chromium.org, Jan 9 2018

Labels: -merge-approved-64 merge-merged-3282
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4d0f7edf82d3b3b53142a763a2516bb9fc6a5933

commit 4d0f7edf82d3b3b53142a763a2516bb9fc6a5933
Author: Hongchan Choi <hongchan@chromium.org>
Date: Tue Jan 09 17:13:53 2018

Fix the activation of AudioWorklet Origin Trial

The previous CL [1] does not completely activate the origin trial
framework for AudioWorklet and it needs small fixes to make it work.

[1]: https://chromium-review.googlesource.com/c/chromium/src/+/810892

TBR=hongchan@chromium.org

(cherry picked from commit d4669e6295fdb410b85d385f20c280ba6bfb1dda)

Bug:  799092 
Change-Id: Iabae27a50b45b88b41b3244c81cbce8abac89684
Reviewed-on: https://chromium-review.googlesource.com/849254
Reviewed-by: Jason Chase <chasej@chromium.org>
Reviewed-by: Raymond Toy <rtoy@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Hongchan Choi <hongchan@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#527321}
Reviewed-on: https://chromium-review.googlesource.com/857542
Reviewed-by: Hongchan Choi <hongchan@chromium.org>
Cr-Commit-Position: refs/branch-heads/3282@{#458}
Cr-Branched-From: 5fdc0fab22ce7efd32532ee989b223fa12f8171e-refs/heads/master@{#520840}
[add] https://crrev.com/4d0f7edf82d3b3b53142a763a2516bb9fc6a5933/third_party/WebKit/LayoutTests/http/tests/origin_trials/webexposed/audioworklet-origin-trial-interfaces.html
[modify] https://crrev.com/4d0f7edf82d3b3b53142a763a2516bb9fc6a5933/third_party/WebKit/Source/modules/webaudio/AudioWorklet.cpp
[modify] https://crrev.com/4d0f7edf82d3b3b53142a763a2516bb9fc6a5933/third_party/WebKit/Source/modules/webaudio/AudioWorkletProcessor.idl
[modify] https://crrev.com/4d0f7edf82d3b3b53142a763a2516bb9fc6a5933/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp
[modify] https://crrev.com/4d0f7edf82d3b3b53142a763a2516bb9fc6a5933/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.idl
[modify] https://crrev.com/4d0f7edf82d3b3b53142a763a2516bb9fc6a5933/third_party/WebKit/Source/platform/audio/AudioDestination.cpp

Project Member

Comment 14 by bugdroid1@chromium.org, Jan 9 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7a3ea89da37fa485834aab094a0dab44c5ff7017

commit 7a3ea89da37fa485834aab094a0dab44c5ff7017
Author: Hongchan Choi <hongchan@chromium.org>
Date: Tue Jan 09 19:51:53 2018

Revert "Fix the activation of AudioWorklet Origin Trial"

This reverts commit 4d0f7edf82d3b3b53142a763a2516bb9fc6a5933.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Fix the activation of AudioWorklet Origin Trial
> 
> The previous CL [1] does not completely activate the origin trial
> framework for AudioWorklet and it needs small fixes to make it work.
> 
> [1]: https://chromium-review.googlesource.com/c/chromium/src/+/810892
> 
> TBR=hongchan@chromium.org
> 
> (cherry picked from commit d4669e6295fdb410b85d385f20c280ba6bfb1dda)
> 
> Bug:  799092 
> Change-Id: Iabae27a50b45b88b41b3244c81cbce8abac89684
> Reviewed-on: https://chromium-review.googlesource.com/849254
> Reviewed-by: Jason Chase <chasej@chromium.org>
> Reviewed-by: Raymond Toy <rtoy@chromium.org>
> Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
> Reviewed-by: Kentaro Hara <haraken@chromium.org>
> Commit-Queue: Hongchan Choi <hongchan@chromium.org>
> Cr-Original-Commit-Position: refs/heads/master@{#527321}
> Reviewed-on: https://chromium-review.googlesource.com/857542
> Reviewed-by: Hongchan Choi <hongchan@chromium.org>
> Cr-Commit-Position: refs/branch-heads/3282@{#458}
> Cr-Branched-From: 5fdc0fab22ce7efd32532ee989b223fa12f8171e-refs/heads/master@{#520840}

TBR=haraken@chromium.org,nhiroki@chromium.org,rtoy@chromium.org,hongchan@chromium.org,chasej@chromium.org

Change-Id: Iafef51bc11168e89e267bf37ab1e5abd713aacb5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug:  799092 
Reviewed-on: https://chromium-review.googlesource.com/857841
Reviewed-by: Hongchan Choi <hongchan@chromium.org>
Cr-Commit-Position: refs/branch-heads/3282@{#466}
Cr-Branched-From: 5fdc0fab22ce7efd32532ee989b223fa12f8171e-refs/heads/master@{#520840}
[delete] https://crrev.com/7a2c6f0b1802f06e39163443daa92c477e2d2b50/third_party/WebKit/LayoutTests/http/tests/origin_trials/webexposed/audioworklet-origin-trial-interfaces.html
[modify] https://crrev.com/7a3ea89da37fa485834aab094a0dab44c5ff7017/third_party/WebKit/Source/modules/webaudio/AudioWorklet.cpp
[modify] https://crrev.com/7a3ea89da37fa485834aab094a0dab44c5ff7017/third_party/WebKit/Source/modules/webaudio/AudioWorkletProcessor.idl
[modify] https://crrev.com/7a3ea89da37fa485834aab094a0dab44c5ff7017/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp
[modify] https://crrev.com/7a3ea89da37fa485834aab094a0dab44c5ff7017/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.idl
[modify] https://crrev.com/7a3ea89da37fa485834aab094a0dab44c5ff7017/third_party/WebKit/Source/platform/audio/AudioDestination.cpp

Project Member

Comment 15 by bugdroid1@chromium.org, Jan 9 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/34760a772848be68ed658b6874002eaf4a505f32

commit 34760a772848be68ed658b6874002eaf4a505f32
Author: Hongchan Choi <hongchan@chromium.org>
Date: Tue Jan 09 22:01:09 2018

Re-merge: Fix the activation of AudioWorklet Origin Trial

The previous CL [1] does not completely activate the origin trial
framework for AudioWorklet and it needs small fixes to make it work.

[1]: https://chromium-review.googlesource.com/c/chromium/src/+/810892

TBR=hongchan@chromium.org

(cherry picked from commit d4669e6)

Bug:  799092 
Change-Id: I1cb82f8ba9c9737bd1142f8e1d5805ce3d07c8f8
Reviewed-on: https://chromium-review.googlesource.com/849254
Reviewed-by: Jason Chase <chasej@chromium.org>
Reviewed-by: Raymond Toy <rtoy@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Hongchan Choi <hongchan@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#527321}
Reviewed-on: https://chromium-review.googlesource.com/858216
Reviewed-by: Hongchan Choi <hongchan@chromium.org>
Cr-Commit-Position: refs/branch-heads/3282@{#470}
Cr-Branched-From: 5fdc0fab22ce7efd32532ee989b223fa12f8171e-refs/heads/master@{#520840}
[add] https://crrev.com/34760a772848be68ed658b6874002eaf4a505f32/third_party/WebKit/LayoutTests/http/tests/origin_trials/webexposed/audioworklet-origin-trial-interfaces.html
[modify] https://crrev.com/34760a772848be68ed658b6874002eaf4a505f32/third_party/WebKit/Source/modules/webaudio/AudioWorklet.cpp
[modify] https://crrev.com/34760a772848be68ed658b6874002eaf4a505f32/third_party/WebKit/Source/modules/webaudio/AudioWorkletProcessor.idl
[modify] https://crrev.com/34760a772848be68ed658b6874002eaf4a505f32/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp
[modify] https://crrev.com/34760a772848be68ed658b6874002eaf4a505f32/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.idl
[modify] https://crrev.com/34760a772848be68ed658b6874002eaf4a505f32/third_party/WebKit/Source/platform/audio/AudioDestination.cpp

Sign in to add a comment