| Index: Source/modules/webaudio/AudioScheduledSourceNode.h
|
| diff --git a/Source/modules/webaudio/AudioScheduledSourceNode.h b/Source/modules/webaudio/AudioScheduledSourceNode.h
|
| index 552fa0e75180ea09a107136d7e38de2fff382a3f..9f1788cb82dea149b5aa1fc86d52e9501d534421 100644
|
| --- a/Source/modules/webaudio/AudioScheduledSourceNode.h
|
| +++ b/Source/modules/webaudio/AudioScheduledSourceNode.h
|
| @@ -54,6 +54,17 @@ public:
|
| FINISHED_STATE = 3
|
| };
|
|
|
| + // This helper class handles the lifetime of an AudioScheduledSourceNode with an onended event
|
| + // listener. This keeps the node alive until the event listener is processed.
|
| + class NotifyEndedTask {
|
| + public:
|
| + NotifyEndedTask(PassRefPtr<AudioScheduledSourceNode> scheduledNode);
|
| + void notifyEnded();
|
| +
|
| + private:
|
| + RefPtr<AudioScheduledSourceNode> m_scheduledNode;
|
| + };
|
| +
|
| AudioScheduledSourceNode(AudioContext*, float sampleRate);
|
|
|
| // Scheduling.
|
| @@ -87,7 +98,6 @@ protected:
|
| virtual void finish();
|
|
|
| static void notifyEndedDispatch(void*);
|
| - void notifyEnded();
|
|
|
| PlaybackState m_playbackState;
|
|
|
|
|