New issue
Advanced search Search tips

Issue 837012 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2018
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 745778



Sign in to add a comment

Fix ctor-audiobuffer.html so as not to access detached buffer

Project Member Reported by rtoy@chromium.org, Apr 25 2018

Issue description

In that test, we do

        let buffer =
            new AudioBuffer({length: 128, sampleRate: context.sampleRate});

        let data = buffer.getChannelData(0);
        for (let k = 0; k < data.length; ++k)
          data[k] = 1 + k;

Later on we expect to use the array data to compare with the output.  But it's detached because the buffer is used an an AudioBufferSource that plays out the data.


 

Comment 1 by rtoy@chromium.org, Apr 25 2018

Blocking: 745778
Project Member

Comment 2 by bugdroid1@chromium.org, Apr 26 2018

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

commit 9edb15ca4945b30c95b3246e489687bea934a37e
Author: Raymond Toy <rtoy@chromium.org>
Date: Thu Apr 26 15:43:05 2018

Adjust test not to access detached buffer

Rearrange test so that we don't use getChannelData to access the
buffer, because when the buffer is played, our view gets detached, and
we're using it to compare with the actual results.

Bug:  837012 
Test: Test passes with Firefox, which correctly detaches data.
Change-Id: I53ce8d97475dc70dab6a3f10ab401a9666544917
Reviewed-on: https://chromium-review.googlesource.com/1029111
Reviewed-by: Hongchan Choi <hongchan@chromium.org>
Commit-Queue: Raymond Toy <rtoy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#554036}
[modify] https://crrev.com/9edb15ca4945b30c95b3246e489687bea934a37e/third_party/WebKit/LayoutTests/webaudio/AudioBuffer/ctor-audiobuffer.html

Comment 3 by rtoy@chromium.org, Apr 27 2018

Status: Fixed (was: Started)

Sign in to add a comment