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

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

Issue 1905343002: Replace AllowCrossThreadAccess() + ThreadSafeRefCounted pointers with PassRefPtr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Kuroneko_3_DoNotAllow_AllowCrossThreadAccess_GCed
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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 provider.provideInput(outputBus, numberOfFrames); 170 provider.provideInput(outputBus, numberOfFrames);
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, PassRefPtr<MediaElementAudioSourceHandler>(this), m_currentSrcS tring));
hiroshige 2016/05/17 03:46:12 I merged mulitiple lines into one here, just to av
181 AllowCrossThreadAccess(this),
182 m_currentSrcString));
183 } 181 }
184 } 182 }
185 outputBus->zero(); 183 outputBus->zero();
186 } 184 }
187 } else { 185 } else {
188 // We failed to acquire the lock. 186 // We failed to acquire the lock.
189 outputBus->zero(); 187 outputBus->zero();
190 } 188 }
191 } 189 }
192 190
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 mediaElementAudioSourceHandler().lock(); 242 mediaElementAudioSourceHandler().lock();
245 } 243 }
246 244
247 void MediaElementAudioSourceNode::unlock() 245 void MediaElementAudioSourceNode::unlock()
248 { 246 {
249 mediaElementAudioSourceHandler().unlock(); 247 mediaElementAudioSourceHandler().unlock();
250 } 248 }
251 249
252 } // namespace blink 250 } // namespace blink
253 251
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698