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

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

Issue 1200333006: Oilpan: Support nested pre-finalizers (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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
« no previous file with comments | « Source/core/html/HTMLMediaElement.cpp ('k') | Source/platform/heap/HeapTest.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 500 matching lines...) Expand 10 before | Expand all | Expand 10 after
511 // there's no reason other nodes should ever call this function. 511 // there's no reason other nodes should ever call this function.
512 ASSERT_WITH_MESSAGE(1, "numberOfOutputChannels() not valid for node type %d" , nodeType()); 512 ASSERT_WITH_MESSAGE(1, "numberOfOutputChannels() not valid for node type %d" , nodeType());
513 return 1; 513 return 1;
514 } 514 }
515 // ---------------------------------------------------------------- 515 // ----------------------------------------------------------------
516 516
517 AudioNode::AudioNode(AudioContext& context) 517 AudioNode::AudioNode(AudioContext& context)
518 : m_context(context) 518 : m_context(context)
519 , m_handler(nullptr) 519 , m_handler(nullptr)
520 { 520 {
521 ThreadState::current()->registerPreFinalizer(*this); 521 ThreadState::current()->registerPreFinalizer(this);
522 } 522 }
523 523
524 void AudioNode::dispose() 524 void AudioNode::dispose()
525 { 525 {
526 ASSERT(isMainThread()); 526 ASSERT(isMainThread());
527 AudioContext::AutoLocker locker(context()); 527 AudioContext::AutoLocker locker(context());
528 handler().dispose(); 528 handler().dispose();
529 if (context()->contextState() == AudioContext::Running) 529 if (context()->contextState() == AudioContext::Running)
530 context()->deferredTaskHandler().addRenderingOrphanHandler(m_handler.rel ease()); 530 context()->deferredTaskHandler().addRenderingOrphanHandler(m_handler.rel ease());
531 } 531 }
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
930 { 930 {
931 m_connectedNodes.append(nullptr); 931 m_connectedNodes.append(nullptr);
932 ASSERT_UNUSED(numberOfOutputs, numberOfOutputs == m_connectedNodes.size()); 932 ASSERT_UNUSED(numberOfOutputs, numberOfOutputs == m_connectedNodes.size());
933 m_connectedParams.append(nullptr); 933 m_connectedParams.append(nullptr);
934 ASSERT_UNUSED(numberOfOutputs, numberOfOutputs == m_connectedParams.size()); 934 ASSERT_UNUSED(numberOfOutputs, numberOfOutputs == m_connectedParams.size());
935 } 935 }
936 936
937 } // namespace blink 937 } // namespace blink
938 938
939 #endif // ENABLE(WEB_AUDIO) 939 #endif // ENABLE(WEB_AUDIO)
OLDNEW
« no previous file with comments | « Source/core/html/HTMLMediaElement.cpp ('k') | Source/platform/heap/HeapTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698