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

Side by Side Diff: Source/modules/webaudio/AudioBufferSourceNode.cpp

Issue 1256053006: Protect AudioScheduledSoureNode::m_startTime and m_endTime. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Revert change to OscillatorNode.cpp Created 5 years, 3 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010, Google Inc. All rights reserved. 2 * Copyright (C) 2010, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 if (grainDuration < 0) { 475 if (grainDuration < 0) {
476 exceptionState.throwDOMException( 476 exceptionState.throwDOMException(
477 InvalidStateError, 477 InvalidStateError,
478 ExceptionMessages::indexExceedsMinimumBound( 478 ExceptionMessages::indexExceedsMinimumBound(
479 "duration", 479 "duration",
480 grainDuration, 480 grainDuration,
481 0.0)); 481 0.0));
482 return; 482 return;
483 } 483 }
484 484
485 // This synchronizes with process(). updateSchedulingInfo will read some of the variables being
486 // set here.
487 MutexLocker processLocker(m_processLock);
488
485 m_isDurationGiven = isDurationGiven; 489 m_isDurationGiven = isDurationGiven;
486 m_isGrain = true; 490 m_isGrain = true;
487 m_grainOffset = grainOffset; 491 m_grainOffset = grainOffset;
488 m_grainDuration = grainDuration; 492 m_grainDuration = grainDuration;
489 493
490 // The node is started. Add a reference to keep us alive so that audio 494 // The node is started. Add a reference to keep us alive so that audio
491 // will eventually get played even if Javascript should drop all references 495 // will eventually get played even if Javascript should drop all references
492 // to this node. The reference will get dropped when the source has finished 496 // to this node. The reference will get dropped when the source has finished
493 // playing. 497 // playing.
494 context()->notifySourceNodeStartedProcessing(node()); 498 context()->notifySourceNodeStartedProcessing(node());
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
699 } 703 }
700 704
701 void AudioBufferSourceNode::start(double when, double grainOffset, double grainD uration, ExceptionState& exceptionState) 705 void AudioBufferSourceNode::start(double when, double grainOffset, double grainD uration, ExceptionState& exceptionState)
702 { 706 {
703 audioBufferSourceHandler().start(when, grainOffset, grainDuration, exception State); 707 audioBufferSourceHandler().start(when, grainOffset, grainDuration, exception State);
704 } 708 }
705 709
706 } // namespace blink 710 } // namespace blink
707 711
708 #endif // ENABLE(WEB_AUDIO) 712 #endif // ENABLE(WEB_AUDIO)
OLDNEW
« no previous file with comments | « Source/modules/webaudio/AudioBufferSourceNode.h ('k') | Source/modules/webaudio/AudioScheduledSourceNode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698