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

Side by Side Diff: Source/modules/webaudio/AudioContext.h

Issue 776203002: Web Audio: Oilpan: Correctly trace m_referencedNodes elements within a lock. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: else trace Created 6 years 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
« no previous file with comments | « no previous file | Source/modules/webaudio/AudioContext.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010, Google Inc. All rights reserved. 2 * Copyright (C) 2010, 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 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 // Oilpan: Since items are added to the vector by the audio thread (not regi stered to Oilpan), 291 // Oilpan: Since items are added to the vector by the audio thread (not regi stered to Oilpan),
292 // we cannot use a HeapVector. 292 // we cannot use a HeapVector.
293 GC_PLUGIN_IGNORE("http://crbug.com/404527") 293 GC_PLUGIN_IGNORE("http://crbug.com/404527")
294 Vector<AudioNode*> m_finishedNodes; 294 Vector<AudioNode*> m_finishedNodes;
295 295
296 // List of source nodes. This is either accessed when the graph lock is 296 // List of source nodes. This is either accessed when the graph lock is
297 // held, or on the main thread when the audio thread has finished. 297 // held, or on the main thread when the audio thread has finished.
298 // Oilpan: This Vector holds connection references. We must call 298 // Oilpan: This Vector holds connection references. We must call
299 // AudioNode::makeConnection when we add an AudioNode to this, and must call 299 // AudioNode::makeConnection when we add an AudioNode to this, and must call
300 // AudioNode::breakConnection() when we remove an AudioNode from this. 300 // AudioNode::breakConnection() when we remove an AudioNode from this.
301 Member<HeapVector<Member<AudioNode>>> m_referencedNodes; 301 HeapVector<Member<AudioNode>> m_referencedNodes;
302 302
303 // Stop rendering the audio graph. 303 // Stop rendering the audio graph.
304 void stopRendering(); 304 void stopRendering();
305 305
306 // Handle Promises for resume() and suspend() 306 // Handle Promises for resume() and suspend()
307 void resolvePromisesForResume(); 307 void resolvePromisesForResume();
308 void resolvePromisesForResumeOnMainThread(); 308 void resolvePromisesForResumeOnMainThread();
309 309
310 void resolvePromisesForSuspend(); 310 void resolvePromisesForSuspend();
311 void resolvePromisesForSuspendOnMainThread(); 311 void resolvePromisesForSuspendOnMainThread();
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 HashSet<AudioNode*> m_automaticPullNodes; 366 HashSet<AudioNode*> m_automaticPullNodes;
367 GC_PLUGIN_IGNORE("http://crbug.com/404527") 367 GC_PLUGIN_IGNORE("http://crbug.com/404527")
368 Vector<AudioNode*> m_renderingAutomaticPullNodes; 368 Vector<AudioNode*> m_renderingAutomaticPullNodes;
369 // m_automaticPullNodesNeedUpdating keeps track if m_automaticPullNodes is m odified. 369 // m_automaticPullNodesNeedUpdating keeps track if m_automaticPullNodes is m odified.
370 bool m_automaticPullNodesNeedUpdating; 370 bool m_automaticPullNodesNeedUpdating;
371 void updateAutomaticPullNodes(); 371 void updateAutomaticPullNodes();
372 372
373 unsigned m_connectionCount; 373 unsigned m_connectionCount;
374 374
375 // Graph locking. 375 // Graph locking.
376 bool m_didInitializeContextGraphMutex;
376 RecursiveMutex m_contextGraphMutex; 377 RecursiveMutex m_contextGraphMutex;
377 volatile ThreadIdentifier m_audioThread; 378 volatile ThreadIdentifier m_audioThread;
378 379
379 // Only accessed in the audio thread. 380 // Only accessed in the audio thread.
380 // Oilpan: Since items are added to these vectors by the audio thread (not r egistered to Oilpan), 381 // Oilpan: Since items are added to these vectors by the audio thread (not r egistered to Oilpan),
381 // we cannot use HeapVectors. 382 // we cannot use HeapVectors.
382 GC_PLUGIN_IGNORE("http://crbug.com/404527") 383 GC_PLUGIN_IGNORE("http://crbug.com/404527")
383 Vector<AudioNode*> m_deferredBreakConnectionList; 384 Vector<AudioNode*> m_deferredBreakConnectionList;
384 385
385 Member<AudioBuffer> m_renderTarget; 386 Member<AudioBuffer> m_renderTarget;
(...skipping 11 matching lines...) Expand all
397 HashSet<AudioNode*> m_deferredCountModeChange; 398 HashSet<AudioNode*> m_deferredCountModeChange;
398 399
399 // This is considering 32 is large enough for multiple channels audio. 400 // This is considering 32 is large enough for multiple channels audio.
400 // It is somewhat arbitrary and could be increased if necessary. 401 // It is somewhat arbitrary and could be increased if necessary.
401 enum { MaxNumberOfChannels = 32 }; 402 enum { MaxNumberOfChannels = 32 };
402 }; 403 };
403 404
404 } // namespace blink 405 } // namespace blink
405 406
406 #endif // AudioContext_h 407 #endif // AudioContext_h
OLDNEW
« no previous file with comments | « no previous file | Source/modules/webaudio/AudioContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698