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

Side by Side Diff: third_party/WebKit/Source/modules/webaudio/MediaElementAudioSourceNode.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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 } 171 }
172 // Output silence if we don't have access to the element. 172 // Output silence if we don't have access to the element.
173 if (!passesCORSAccessCheck()) { 173 if (!passesCORSAccessCheck()) {
174 if (m_maybePrintCORSMessage) { 174 if (m_maybePrintCORSMessage) {
175 // Print a CORS message, but just once for each change in the cu rrent media 175 // Print a CORS message, but just once for each change in the cu rrent media
176 // element source, and only if we have a document to print to. 176 // element source, and only if we have a document to print to.
177 m_maybePrintCORSMessage = false; 177 m_maybePrintCORSMessage = false;
178 if (context()->getExecutionContext()) { 178 if (context()->getExecutionContext()) {
179 context()->getExecutionContext()->postTask(BLINK_FROM_HERE, 179 context()->getExecutionContext()->postTask(BLINK_FROM_HERE,
180 createCrossThreadTask(&MediaElementAudioSourceHandler::p rintCORSMessage, 180 createCrossThreadTask(&MediaElementAudioSourceHandler::p rintCORSMessage,
181 this, 181 AllowCrossThreadAccess(this),
182 m_currentSrcString)); 182 m_currentSrcString));
183 } 183 }
184 } 184 }
185 outputBus->zero(); 185 outputBus->zero();
186 } 186 }
187 } else { 187 } else {
188 // We failed to acquire the lock. 188 // We failed to acquire the lock.
189 outputBus->zero(); 189 outputBus->zero();
190 } 190 }
191 } 191 }
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 mediaElementAudioSourceHandler().lock(); 244 mediaElementAudioSourceHandler().lock();
245 } 245 }
246 246
247 void MediaElementAudioSourceNode::unlock() 247 void MediaElementAudioSourceNode::unlock()
248 { 248 {
249 mediaElementAudioSourceHandler().unlock(); 249 mediaElementAudioSourceHandler().unlock();
250 } 250 }
251 251
252 } // namespace blink 252 } // namespace blink
253 253
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698