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

Side by Side Diff: third_party/WebKit/Source/modules/webaudio/ScriptProcessorNode.h

Issue 1762103002: Keep ScriptProcessorNode from premature GC with ScriptWrappable::hasPendingActivity() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed the manual test and fixed the exisiting automated test Created 4 years, 9 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) 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 // called and how many sample-frames need to be processed each call. 99 // called and how many sample-frames need to be processed each call.
100 // Lower numbers for bufferSize will result in a lower (better) 100 // Lower numbers for bufferSize will result in a lower (better)
101 // latency. Higher numbers will be necessary to avoid audio breakup and 101 // latency. Higher numbers will be necessary to avoid audio breakup and
102 // glitches. 102 // glitches.
103 // The value chosen must carefully balance between latency and audio quality . 103 // The value chosen must carefully balance between latency and audio quality .
104 static ScriptProcessorNode* create(AbstractAudioContext&, float sampleRate, size_t bufferSize, unsigned numberOfInputChannels, unsigned numberOfOutputChanne ls); 104 static ScriptProcessorNode* create(AbstractAudioContext&, float sampleRate, size_t bufferSize, unsigned numberOfInputChannels, unsigned numberOfOutputChanne ls);
105 105
106 DEFINE_ATTRIBUTE_EVENT_LISTENER(audioprocess); 106 DEFINE_ATTRIBUTE_EVENT_LISTENER(audioprocess);
107 size_t bufferSize() const; 107 size_t bufferSize() const;
108 108
109 // ScriptWrappable
110 bool hasPendingActivity() const final;
111
109 private: 112 private:
110 ScriptProcessorNode(AbstractAudioContext&, float sampleRate, size_t bufferSi ze, unsigned numberOfInputChannels, unsigned numberOfOutputChannels); 113 ScriptProcessorNode(AbstractAudioContext&, float sampleRate, size_t bufferSi ze, unsigned numberOfInputChannels, unsigned numberOfOutputChannels);
111 }; 114 };
112 115
113 } // namespace blink 116 } // namespace blink
114 117
115 #endif // ScriptProcessorNode_h 118 #endif // ScriptProcessorNode_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698