Chromium Code Reviews| Index: tools/dom/templates/html/dart2js/impl_AudioBufferSourceNode.darttemplate |
| diff --git a/tools/dom/templates/html/dart2js/impl_AudioBufferSourceNode.darttemplate b/tools/dom/templates/html/dart2js/impl_AudioBufferSourceNode.darttemplate |
| index 36529bba49d15b5ac2a2f4c6ed2437a4aec213ab..c02ca7aadcb915e3e4af65d905bd6e03f0e9dcb8 100644 |
| --- a/tools/dom/templates/html/dart2js/impl_AudioBufferSourceNode.darttemplate |
| +++ b/tools/dom/templates/html/dart2js/impl_AudioBufferSourceNode.darttemplate |
| @@ -10,18 +10,18 @@ $(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC { |
| // instead of noteOn. |
| void start(num when, [num grainOffset, num grainDuration]) { |
| if (JS('bool', '!!#.start', this)) { |
| - if (?grainDuration) { |
| - JS('void', '#.start(#, #, #)', this, when, grainOffset, grainDuration); |
| - } else if (?grainOffset) { |
| + if (grainOffset != null) { |
|
blois
2013/04/30 01:12:19
The grainOffset/grainDuration are flipped- probabl
|
| JS('void', '#.start(#, #)', this, when, grainOffset); |
| + } else if (grainDuration != null) { |
| + JS('void', '#.start(#, #, #)', this, when, grainOffset, grainDuration); |
| } else { |
| JS('void', '#.start(#)', this, when); |
| } |
| } else { |
| - if (?grainDuration) { |
| - JS('void', '#.noteOn(#, #, #)', this, when, grainOffset, grainDuration); |
| - } else if (?grainOffset) { |
| + if (grainOffset != null) { |
| JS('void', '#.noteOn(#, #)', this, when, grainOffset); |
| + } else if (grainDuration != null) { |
| + JS('void', '#.noteOn(#, #, #)', this, when, grainOffset, grainDuration); |
| } else { |
| JS('void', '#.noteOn(#)', this, when); |
| } |