| 
 | 
 | 
 Chromium Code Reviews
 Chromium Code Reviews Issue 
            1497823003:
    Make ConvolverNode.buffer and WaveShaperNode.curve nullable  (Closed)
    
  
    Issue 
            1497823003:
    Make ConvolverNode.buffer and WaveShaperNode.curve nullable  (Closed) 
  | Created: 5 years ago by philipj_slow Modified: 5 years ago CC: chromium-reviews, blink-reviews Base URL: https://chromium.googlesource.com/chromium/src.git@master Target Ref: refs/pending/heads/master Project: chromium Visibility: Public. | DescriptionMake ConvolverNode.buffer and WaveShaperNode.curve nullable
These are nullable in the spec:
https://webaudio.github.io/web-audio-api/#ConvolverNode
https://webaudio.github.io/web-audio-api/#WaveShaperNode
Because of [LegacyInterfaceTypeChecking], this does not change the
generated code at all, and is therefore not testable. However, it will
result in the correct behavior once [LegacyInterfaceTypeChecking] is
removed, to be done separately.
BUG=561338
Committed: https://crrev.com/26b3d37b4c4cf2c6ae994037887518e1520ecc45
Cr-Commit-Position: refs/heads/master@{#363159}
   Patch Set 1 #
 Messages
    Total messages: 18 (5 generated)
     
 The CQ bit was checked by philipj@opera.com to run a CQ dry run 
 Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1497823003/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1497823003/1 
 philipj@opera.com changed reviewers: + hongchan@chromium.org, kbr@chromium.org, rtoy@chromium.org 
 PTAL. There's a similar case with AudioBufferSourceNode.buffer, but changing that would actually change behavior, and isn't clear in the spec: https://github.com/WebAudio/web-audio-api/issues/666 
 Looks fine, but Raymond or Hongchan should review. 
 Thanks for the CL. Setting .buffer has been a well-discussed issue and I think the WebAudio group has gone back and forth on this many times. We'll have to wait for some kind of resolution on the issue before proceeding any further here. 
 On 2015/12/03 22:57:13, Raymond Toy wrote: > Thanks for the CL. > > Setting .buffer has been a well-discussed issue and I think the WebAudio group > has gone back and forth on this many times. We'll have to wait for some kind of > resolution on the issue before proceeding any further here. This CL is not about AudioBufferSourceNode.buffer, however, it doesn't actually change anything at all except make the coming [LegacyInterfaceTypeChecking] removal easier to understand. 
 On 2015/12/03 22:59:54, philipj wrote: > On 2015/12/03 22:57:13, Raymond Toy wrote: > > Thanks for the CL. > > > > Setting .buffer has been a well-discussed issue and I think the WebAudio group > > has gone back and forth on this many times. We'll have to wait for some kind > of > > resolution on the issue before proceeding any further here. > > This CL is not about AudioBufferSourceNode.buffer, however, it doesn't actually > change anything at all except make the coming [LegacyInterfaceTypeChecking] > removal easier to understand. So with this change this will behave as it does today? n = context.createConvolver(); n.buffer = null; // no error n.buffer = context.createBuffer(1,1,context.sampleRate); n.buffer = null; // no error 
 On 2015/12/03 23:08:43, Raymond Toy wrote:
> On 2015/12/03 22:59:54, philipj wrote:
> > On 2015/12/03 22:57:13, Raymond Toy wrote:
> > > Thanks for the CL.
> > > 
> > > Setting .buffer has been a well-discussed issue and I think the WebAudio
> group
> > > has gone back and forth on this many times.  We'll have to wait for some
> kind
> > of
> > > resolution on the issue before proceeding any further here.
> > 
> > This CL is not about AudioBufferSourceNode.buffer, however, it doesn't
> actually
> > change anything at all except make the coming [LegacyInterfaceTypeChecking]
> > removal easier to understand.
> 
> So with this change this will behave as it does today?
> 
>   n = context.createConvolver();
>   n.buffer = null; // no error
>   n.buffer = context.createBuffer(1,1,context.sampleRate);
>   n.buffer = null; // no error
Right, because [LegacyInterfaceTypeChecking] is used here, there is no change to
the generated code at all. If I would have removed [LegacyInterfaceTypeChecking]
without first making these nullable, however, `n.buffer = null` would begin
throwing TypeError, where it currently does nothing. The thing that *should*
throw TypeError per WebIDL is something like `n.buffer = {}`, i.e. assigning
something other than null or an AudioBuffer instance.
 The CQ bit was unchecked by commit-bot@chromium.org 
 Dry run: Try jobs failed on following builders: win8_chromium_ng on tryserver.chromium.win (JOB_TIMED_OUT, no build URL) win_chromium_compile_dbg_ng on tryserver.chromium.win (JOB_TIMED_OUT, no build URL) win_chromium_rel_ng on tryserver.chromium.win (JOB_TIMED_OUT, no build URL) win_chromium_x64_rel_ng on tryserver.chromium.win (JOB_TIMED_OUT, no build URL) 
 On 2015/12/03 23:36:09, philipj wrote:
> On 2015/12/03 23:08:43, Raymond Toy wrote:
> > On 2015/12/03 22:59:54, philipj wrote:
> > > On 2015/12/03 22:57:13, Raymond Toy wrote:
> > > > Thanks for the CL.
> > > > 
> > > > Setting .buffer has been a well-discussed issue and I think the WebAudio
> > group
> > > > has gone back and forth on this many times.  We'll have to wait for some
> > kind
> > > of
> > > > resolution on the issue before proceeding any further here.
> > > 
> > > This CL is not about AudioBufferSourceNode.buffer, however, it doesn't
> > actually
> > > change anything at all except make the coming
[LegacyInterfaceTypeChecking]
> > > removal easier to understand.
> > 
> > So with this change this will behave as it does today?
> > 
> >   n = context.createConvolver();
> >   n.buffer = null; // no error
> >   n.buffer = context.createBuffer(1,1,context.sampleRate);
> >   n.buffer = null; // no error
> 
> Right, because [LegacyInterfaceTypeChecking] is used here, there is no change
to
> the generated code at all. If I would have removed
[LegacyInterfaceTypeChecking]
> without first making these nullable, however, `n.buffer = null` would begin
> throwing TypeError, where it currently does nothing. The thing that *should*
> throw TypeError per WebIDL is something like `n.buffer = {}`, i.e. assigning
> something other than null or an AudioBuffer instance.
Thanks for great explanation!  I'm happy with this change as is.
lgtm.
 On 2015/12/03 23:43:44, Raymond Toy wrote:
> On 2015/12/03 23:36:09, philipj wrote:
> > On 2015/12/03 23:08:43, Raymond Toy wrote:
> > > On 2015/12/03 22:59:54, philipj wrote:
> > > > On 2015/12/03 22:57:13, Raymond Toy wrote:
> > > > > Thanks for the CL.
> > > > > 
> > > > > Setting .buffer has been a well-discussed issue and I think the
WebAudio
> > > group
> > > > > has gone back and forth on this many times.  We'll have to wait for
some
> > > kind
> > > > of
> > > > > resolution on the issue before proceeding any further here.
> > > > 
> > > > This CL is not about AudioBufferSourceNode.buffer, however, it doesn't
> > > actually
> > > > change anything at all except make the coming
> [LegacyInterfaceTypeChecking]
> > > > removal easier to understand.
> > > 
> > > So with this change this will behave as it does today?
> > > 
> > >   n = context.createConvolver();
> > >   n.buffer = null; // no error
> > >   n.buffer = context.createBuffer(1,1,context.sampleRate);
> > >   n.buffer = null; // no error
> > 
> > Right, because [LegacyInterfaceTypeChecking] is used here, there is no
change
> to
> > the generated code at all. If I would have removed
> [LegacyInterfaceTypeChecking]
> > without first making these nullable, however, `n.buffer = null` would begin
> > throwing TypeError, where it currently does nothing. The thing that *should*
> > throw TypeError per WebIDL is something like `n.buffer = {}`, i.e. assigning
> > something other than null or an AudioBuffer instance.
> 
> Thanks for great explanation!  I'm happy with this change as is.
> 
> lgtm.
Same with rtoy. Thanks for the explanation.
lgtm
 The CQ bit was checked by philipj@opera.com 
 CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1497823003/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1497823003/1 
 
            
              
                Message was sent while issue was closed.
              
            
             Committed patchset #1 (id:1) 
 
            
              
                Message was sent while issue was closed.
              
            
             Description was changed from ========== Make ConvolverNode.buffer and WaveShaperNode.curve nullable These are nullable in the spec: https://webaudio.github.io/web-audio-api/#ConvolverNode https://webaudio.github.io/web-audio-api/#WaveShaperNode Because of [LegacyInterfaceTypeChecking], this does not change the generated code at all, and is therefore not testable. However, it will result in the correct behavior once [LegacyInterfaceTypeChecking] is removed, to be done separately. BUG=561338 ========== to ========== Make ConvolverNode.buffer and WaveShaperNode.curve nullable These are nullable in the spec: https://webaudio.github.io/web-audio-api/#ConvolverNode https://webaudio.github.io/web-audio-api/#WaveShaperNode Because of [LegacyInterfaceTypeChecking], this does not change the generated code at all, and is therefore not testable. However, it will result in the correct behavior once [LegacyInterfaceTypeChecking] is removed, to be done separately. BUG=561338 Committed: https://crrev.com/26b3d37b4c4cf2c6ae994037887518e1520ecc45 Cr-Commit-Position: refs/heads/master@{#363159} ========== 
 
            
              
                Message was sent while issue was closed.
              
            
             Patchset 1 (id:??) landed as https://crrev.com/26b3d37b4c4cf2c6ae994037887518e1520ecc45 Cr-Commit-Position: refs/heads/master@{#363159} | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
