Title: [278266] trunk/Source/WebCore
Revision
278266
Author
[email protected]
Date
2021-05-30 20:02:34 -0700 (Sun, 30 May 2021)

Log Message

Drop PendingActivity from ScriptProcessorNode
https://bugs.webkit.org/show_bug.cgi?id=226442

Reviewed by Darin Adler.

ScriptProcessorNode already has a virtualHasPendingActivity() implementation that keeps
the JS wrapper alive as long has the audio context is running and there is an "audioprocess"
event listener registered on the node. Therefore, there is no need for an additional
PendingActivity data member.

* Modules/webaudio/AudioNode.cpp:
(WebCore::AudioNode::markNodeForDeletionIfNecessary):
* Modules/webaudio/AudioNode.h:
(WebCore::AudioNode::didBecomeMarkedForDeletion): Deleted.
* Modules/webaudio/ScriptProcessorNode.cpp:
(WebCore::ScriptProcessorNode::ScriptProcessorNode):
(WebCore::ScriptProcessorNode::didBecomeMarkedForDeletion): Deleted.
* Modules/webaudio/ScriptProcessorNode.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (278265 => 278266)


--- trunk/Source/WebCore/ChangeLog	2021-05-31 02:57:04 UTC (rev 278265)
+++ trunk/Source/WebCore/ChangeLog	2021-05-31 03:02:34 UTC (rev 278266)
@@ -1,5 +1,26 @@
 2021-05-30  Chris Dumez  <[email protected]>
 
+        Drop PendingActivity from ScriptProcessorNode
+        https://bugs.webkit.org/show_bug.cgi?id=226442
+
+        Reviewed by Darin Adler.
+
+        ScriptProcessorNode already has a virtualHasPendingActivity() implementation that keeps
+        the JS wrapper alive as long has the audio context is running and there is an "audioprocess"
+        event listener registered on the node. Therefore, there is no need for an additional
+        PendingActivity data member.
+
+        * Modules/webaudio/AudioNode.cpp:
+        (WebCore::AudioNode::markNodeForDeletionIfNecessary):
+        * Modules/webaudio/AudioNode.h:
+        (WebCore::AudioNode::didBecomeMarkedForDeletion): Deleted.
+        * Modules/webaudio/ScriptProcessorNode.cpp:
+        (WebCore::ScriptProcessorNode::ScriptProcessorNode):
+        (WebCore::ScriptProcessorNode::didBecomeMarkedForDeletion): Deleted.
+        * Modules/webaudio/ScriptProcessorNode.h:
+
+2021-05-30  Chris Dumez  <[email protected]>
+
         Remove some dead code from BaseAudioContext / AudioContext
         https://bugs.webkit.org/show_bug.cgi?id=226441
 

Modified: trunk/Source/WebCore/Modules/webaudio/AudioNode.cpp (278265 => 278266)


--- trunk/Source/WebCore/Modules/webaudio/AudioNode.cpp	2021-05-31 02:57:04 UTC (rev 278265)
+++ trunk/Source/WebCore/Modules/webaudio/AudioNode.cpp	2021-05-31 03:02:34 UTC (rev 278266)
@@ -630,7 +630,6 @@
     // Mark for deletion at end of each render quantum or when context shuts down.
     context().markForDeletion(*this);
     m_isMarkedForDeletion = true;
-    didBecomeMarkedForDeletion();
 }
 
 void AudioNode::ref()

Modified: trunk/Source/WebCore/Modules/webaudio/AudioNode.h (278265 => 278266)


--- trunk/Source/WebCore/Modules/webaudio/AudioNode.h	2021-05-31 02:57:04 UTC (rev 278265)
+++ trunk/Source/WebCore/Modules/webaudio/AudioNode.h	2021-05-31 03:02:34 UTC (rev 278266)
@@ -99,7 +99,6 @@
 
     // Can be called from main thread or context's audio thread.  It must be called while the context's graph lock is held.
     void decrementConnectionCountWithLock();
-    virtual void didBecomeMarkedForDeletion() { }
 
     // The AudioNodeInput(s) (if any) will already have their input data available when process() is called.
     // Subclasses will take this input data and put the results in the AudioBus(s) of its AudioNodeOutput(s) (if any).

Modified: trunk/Source/WebCore/Modules/webaudio/ScriptProcessorNode.cpp (278265 => 278266)


--- trunk/Source/WebCore/Modules/webaudio/ScriptProcessorNode.cpp	2021-05-31 02:57:04 UTC (rev 278265)
+++ trunk/Source/WebCore/Modules/webaudio/ScriptProcessorNode.cpp	2021-05-31 03:02:34 UTC (rev 278266)
@@ -70,7 +70,6 @@
 
     initialize();
     suspendIfNeeded();
-    m_pendingActivity = makePendingActivity(*this);
 }
 
 ScriptProcessorNode::~ScriptProcessorNode()
@@ -134,13 +133,6 @@
     AudioNode::uninitialize();
 }
 
-void ScriptProcessorNode::didBecomeMarkedForDeletion()
-{
-    ASSERT(context().isGraphOwner());
-    m_pendingActivity = nullptr;
-    ASSERT(!hasPendingActivity());
-}
-
 void ScriptProcessorNode::process(size_t framesToProcess)
 {
     // Discussion about inputs and outputs:

Modified: trunk/Source/WebCore/Modules/webaudio/ScriptProcessorNode.h (278265 => 278266)


--- trunk/Source/WebCore/Modules/webaudio/ScriptProcessorNode.h	2021-05-31 02:57:04 UTC (rev 278265)
+++ trunk/Source/WebCore/Modules/webaudio/ScriptProcessorNode.h	2021-05-31 03:02:34 UTC (rev 278266)
@@ -62,7 +62,6 @@
     void process(size_t framesToProcess) override;
     void initialize() override;
     void uninitialize() override;
-    void didBecomeMarkedForDeletion() override;
 
     size_t bufferSize() const { return m_bufferSize; }
 
@@ -102,7 +101,6 @@
     unsigned m_numberOfOutputChannels;
 
     RefPtr<AudioBus> m_internalInputBus;
-    RefPtr<PendingActivity<ScriptProcessorNode>> m_pendingActivity;
     bool m_hasAudioProcessEventListener { false };
 };
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to