Title: [196927] releases/WebKitGTK/webkit-2.10/Source/WebCore
Revision
196927
Author
[email protected]
Date
2016-02-22 02:32:35 -0800 (Mon, 22 Feb 2016)

Log Message

Merge r196602 - Null-deref crash in DefaultAudioDestinationNode::suspend()
https://bugs.webkit.org/show_bug.cgi?id=154248

Reviewed by Alex Christensen.

Null-check scriptExecutionContext() before deref.

* Modules/webaudio/DefaultAudioDestinationNode.cpp:
(WebCore::DefaultAudioDestinationNode::resume):
(WebCore::DefaultAudioDestinationNode::suspend):
(WebCore::DefaultAudioDestinationNode::close):

Modified Paths

Diff

Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/ChangeLog (196926 => 196927)


--- releases/WebKitGTK/webkit-2.10/Source/WebCore/ChangeLog	2016-02-22 10:31:11 UTC (rev 196926)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/ChangeLog	2016-02-22 10:32:35 UTC (rev 196927)
@@ -1,3 +1,17 @@
+2016-02-15  Jer Noble  <[email protected]>
+
+        Null-deref crash in DefaultAudioDestinationNode::suspend()
+        https://bugs.webkit.org/show_bug.cgi?id=154248
+
+        Reviewed by Alex Christensen.
+
+        Null-check scriptExecutionContext() before deref.
+
+        * Modules/webaudio/DefaultAudioDestinationNode.cpp:
+        (WebCore::DefaultAudioDestinationNode::resume):
+        (WebCore::DefaultAudioDestinationNode::suspend):
+        (WebCore::DefaultAudioDestinationNode::close):
+
 2016-02-12  Csaba Osztrogonác  <[email protected]>
 
         GCC buildfix in Source/WebCore/svg/SVGToOTFFontConversion.cpp

Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/Modules/webaudio/DefaultAudioDestinationNode.cpp (196926 => 196927)


--- releases/WebKitGTK/webkit-2.10/Source/WebCore/Modules/webaudio/DefaultAudioDestinationNode.cpp	2016-02-22 10:31:11 UTC (rev 196926)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/Modules/webaudio/DefaultAudioDestinationNode.cpp	2016-02-22 10:32:35 UTC (rev 196927)
@@ -111,7 +111,8 @@
     ASSERT(isInitialized());
     if (isInitialized())
         m_destination->start();
-    context()->scriptExecutionContext()->postTask(function);
+    if (auto scriptExecutionContext = context()->scriptExecutionContext())
+        scriptExecutionContext->postTask(function);
 }
 
 void DefaultAudioDestinationNode::suspend(std::function<void()> function)
@@ -119,14 +120,16 @@
     ASSERT(isInitialized());
     if (isInitialized())
         m_destination->stop();
-    context()->scriptExecutionContext()->postTask(function);
+    if (auto scriptExecutionContext = context()->scriptExecutionContext())
+        scriptExecutionContext->postTask(function);
 }
 
 void DefaultAudioDestinationNode::close(std::function<void()> function)
 {
     ASSERT(isInitialized());
     uninitialize();
-    context()->scriptExecutionContext()->postTask(function);
+    if (auto scriptExecutionContext = context()->scriptExecutionContext())
+        scriptExecutionContext->postTask(function);
 }
 
 unsigned long DefaultAudioDestinationNode::maxChannelCount() const
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to