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

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

Issue 221243002: Move many calls of lazyInitialize() from AudioContext to AudioNode. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix comments Created 6 years, 8 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
« no previous file with comments | « Source/modules/webaudio/AudioContext.cpp ('k') | no next file » | 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 , m_lastNonSilentTime(-1) 52 , m_lastNonSilentTime(-1)
53 , m_normalRefCount(1) // start out with normal refCount == 1 (like WTF::RefC ounted class) 53 , m_normalRefCount(1) // start out with normal refCount == 1 (like WTF::RefC ounted class)
54 , m_connectionRefCount(0) 54 , m_connectionRefCount(0)
55 , m_isMarkedForDeletion(false) 55 , m_isMarkedForDeletion(false)
56 , m_isDisabled(false) 56 , m_isDisabled(false)
57 , m_channelCount(2) 57 , m_channelCount(2)
58 , m_channelCountMode(Max) 58 , m_channelCountMode(Max)
59 , m_channelInterpretation(AudioBus::Speakers) 59 , m_channelInterpretation(AudioBus::Speakers)
60 { 60 {
61 ScriptWrappable::init(this); 61 ScriptWrappable::init(this);
62 context->lazyInitialize();
62 #if DEBUG_AUDIONODE_REFERENCES 63 #if DEBUG_AUDIONODE_REFERENCES
63 if (!s_isNodeCountInitialized) { 64 if (!s_isNodeCountInitialized) {
64 s_isNodeCountInitialized = true; 65 s_isNodeCountInitialized = true;
65 atexit(AudioNode::printNodeCounts); 66 atexit(AudioNode::printNodeCounts);
66 } 67 }
67 #endif 68 #endif
68 } 69 }
69 70
70 AudioNode::~AudioNode() 71 AudioNode::~AudioNode()
71 { 72 {
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after
582 fprintf(stderr, "%d: %d\n", i, s_nodeCount[i]); 583 fprintf(stderr, "%d: %d\n", i, s_nodeCount[i]);
583 584
584 fprintf(stderr, "===========================\n\n\n"); 585 fprintf(stderr, "===========================\n\n\n");
585 } 586 }
586 587
587 #endif // DEBUG_AUDIONODE_REFERENCES 588 #endif // DEBUG_AUDIONODE_REFERENCES
588 589
589 } // namespace WebCore 590 } // namespace WebCore
590 591
591 #endif // ENABLE(WEB_AUDIO) 592 #endif // ENABLE(WEB_AUDIO)
OLDNEW
« no previous file with comments | « Source/modules/webaudio/AudioContext.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698