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

Side by Side Diff: third_party/WebKit/Source/modules/webaudio/OfflineAudioDestinationNode.cpp

Issue 1766143002: Apply AllowCrossThreadAccess() in the callers of createCrossThreadTask() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@temp1549143002
Patch Set: Rebase Created 4 years, 7 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) 2011, Google Inc. All rights reserved. 2 * Copyright (C) 2011, 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 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 } 210 }
211 } 211 }
212 212
213 void OfflineAudioDestinationHandler::finishOfflineRendering() 213 void OfflineAudioDestinationHandler::finishOfflineRendering()
214 { 214 {
215 ASSERT(!isMainThread()); 215 ASSERT(!isMainThread());
216 216
217 // The actual rendering has been completed. Notify the context. 217 // The actual rendering has been completed. Notify the context.
218 if (context()->getExecutionContext()) { 218 if (context()->getExecutionContext()) {
219 context()->getExecutionContext()->postTask(BLINK_FROM_HERE, 219 context()->getExecutionContext()->postTask(BLINK_FROM_HERE,
220 createCrossThreadTask(&OfflineAudioDestinationHandler::notifyComplet e, this)); 220 createCrossThreadTask(&OfflineAudioDestinationHandler::notifyComplet e, AllowCrossThreadAccess(this)));
221 } 221 }
222 } 222 }
223 223
224 void OfflineAudioDestinationHandler::notifySuspend(size_t frame) 224 void OfflineAudioDestinationHandler::notifySuspend(size_t frame)
225 { 225 {
226 ASSERT(isMainThread()); 226 ASSERT(isMainThread());
227 227
228 if (context()) 228 if (context())
229 context()->resolveSuspendOnMainThread(frame); 229 context()->resolveSuspendOnMainThread(frame);
230 } 230 }
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 { 311 {
312 setHandler(OfflineAudioDestinationHandler::create(*this, renderTarget)); 312 setHandler(OfflineAudioDestinationHandler::create(*this, renderTarget));
313 } 313 }
314 314
315 OfflineAudioDestinationNode* OfflineAudioDestinationNode::create(AbstractAudioCo ntext* context, AudioBuffer* renderTarget) 315 OfflineAudioDestinationNode* OfflineAudioDestinationNode::create(AbstractAudioCo ntext* context, AudioBuffer* renderTarget)
316 { 316 {
317 return new OfflineAudioDestinationNode(*context, renderTarget); 317 return new OfflineAudioDestinationNode(*context, renderTarget);
318 } 318 }
319 319
320 } // namespace blink 320 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698