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

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

Issue 915703002: Add task location information to ExecutionContext (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased. Created 5 years, 10 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012, Google Inc. All rights reserved. 2 * Copyright (C) 2012, 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 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 // Let the context dereference this AudioNode. 198 // Let the context dereference this AudioNode.
199 context()->notifyNodeFinishedProcessing(this); 199 context()->notifyNodeFinishedProcessing(this);
200 m_playbackState = FINISHED_STATE; 200 m_playbackState = FINISHED_STATE;
201 } 201 }
202 } 202 }
203 void AudioScheduledSourceNode::finish() 203 void AudioScheduledSourceNode::finish()
204 { 204 {
205 finishWithoutOnEnded(); 205 finishWithoutOnEnded();
206 206
207 if (m_hasEndedListener && context()->executionContext()) { 207 if (m_hasEndedListener && context()->executionContext()) {
208 context()->executionContext()->postTask(createCrossThreadTask(&AudioSche duledSourceNode::notifyEnded, this)); 208 context()->executionContext()->postTask(FROM_HERE, createCrossThreadTask (&AudioScheduledSourceNode::notifyEnded, this));
209 } 209 }
210 } 210 }
211 211
212 void AudioScheduledSourceNode::notifyEnded() 212 void AudioScheduledSourceNode::notifyEnded()
213 { 213 {
214 dispatchEvent(Event::create(EventTypeNames::ended)); 214 dispatchEvent(Event::create(EventTypeNames::ended));
215 } 215 }
216 216
217 } // namespace blink 217 } // namespace blink
218 218
219 #endif // ENABLE(WEB_AUDIO) 219 #endif // ENABLE(WEB_AUDIO)
OLDNEW
« no previous file with comments | « Source/modules/webaudio/AudioContext.cpp ('k') | Source/modules/webaudio/OfflineAudioDestinationNode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698