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

Unified Diff: third_party/WebKit/Source/modules/webaudio/AudioBufferSourceNode.cpp

Issue 2760353002: Define default values for options dictionaries for WebAudio (Closed)
Patch Set: Rebase Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/webaudio/AudioBufferSourceNode.cpp
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioBufferSourceNode.cpp b/third_party/WebKit/Source/modules/webaudio/AudioBufferSourceNode.cpp
index d0904f9c8937442c1c344e4dbdc44959cca07fb1..c5a6487d3a628cdce1237e8541560c8e1baedfb8 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioBufferSourceNode.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/AudioBufferSourceNode.cpp
@@ -678,16 +678,11 @@ AudioBufferSourceNode* AudioBufferSourceNode::Create(
if (options.hasBuffer())
node->setBuffer(options.buffer(), exception_state);
- if (options.hasDetune())
- node->detune()->setValue(options.detune());
- if (options.hasLoop())
- node->setLoop(options.loop());
- if (options.hasLoopEnd())
- node->setLoopEnd(options.loopEnd());
- if (options.hasLoopStart())
- node->setLoopStart(options.loopStart());
- if (options.hasPlaybackRate())
- node->playbackRate()->setValue(options.playbackRate());
+ node->detune()->setValue(options.detune());
+ node->setLoop(options.loop());
+ node->setLoopEnd(options.loopEnd());
+ node->setLoopStart(options.loopStart());
+ node->playbackRate()->setValue(options.playbackRate());
return node;
}

Powered by Google App Engine
This is Rietveld 408576698