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

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

Issue 614373007: Oilpan: Remove adoptRefCountedGarbageCollected (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 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
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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 AudioContext* AudioContext::create(Document& document, ExceptionState& exception State) 82 AudioContext* AudioContext::create(Document& document, ExceptionState& exception State)
83 { 83 {
84 ASSERT(isMainThread()); 84 ASSERT(isMainThread());
85 if (s_hardwareContextCount >= MaxHardwareContexts) { 85 if (s_hardwareContextCount >= MaxHardwareContexts) {
86 exceptionState.throwDOMException( 86 exceptionState.throwDOMException(
87 SyntaxError, 87 SyntaxError,
88 "number of hardware contexts reached maximum (" + String::number(Max HardwareContexts) + ")."); 88 "number of hardware contexts reached maximum (" + String::number(Max HardwareContexts) + ").");
89 return 0; 89 return 0;
90 } 90 }
91 91
92 AudioContext* audioContext = adoptRefCountedGarbageCollectedWillBeNoop(new A udioContext(&document)); 92 AudioContext* audioContext = new AudioContext(&document);
93 audioContext->suspendIfNeeded(); 93 audioContext->suspendIfNeeded();
94 return audioContext; 94 return audioContext;
95 } 95 }
96 96
97 // Constructor for rendering to the audio hardware. 97 // Constructor for rendering to the audio hardware.
98 AudioContext::AudioContext(Document* document) 98 AudioContext::AudioContext(Document* document)
99 : ActiveDOMObject(document) 99 : ActiveDOMObject(document)
100 , m_isStopScheduled(false) 100 , m_isStopScheduled(false)
101 , m_isCleared(false) 101 , m_isCleared(false)
102 , m_isInitialized(false) 102 , m_isInitialized(false)
(...skipping 764 matching lines...) Expand 10 before | Expand all | Expand 10 after
867 867
868 for (HashSet<AudioNode*>::iterator k = m_deferredCountModeChange.begin(); k != m_deferredCountModeChange.end(); ++k) 868 for (HashSet<AudioNode*>::iterator k = m_deferredCountModeChange.begin(); k != m_deferredCountModeChange.end(); ++k)
869 (*k)->updateChannelCountMode(); 869 (*k)->updateChannelCountMode();
870 870
871 m_deferredCountModeChange.clear(); 871 m_deferredCountModeChange.clear();
872 } 872 }
873 873
874 } // namespace blink 874 } // namespace blink
875 875
876 #endif // ENABLE(WEB_AUDIO) 876 #endif // ENABLE(WEB_AUDIO)
OLDNEW
« no previous file with comments | « Source/modules/webaudio/AudioBufferSourceNode.cpp ('k') | Source/modules/webaudio/BiquadFilterNode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698