Changeset 196602 in webkit


Ignore:
Timestamp:
Feb 15, 2016 2:36:00 PM (8 years ago)
Author:
jer.noble@apple.com
Message:

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):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r196599 r196602  
     12016-02-15  Jer Noble  <jer.noble@apple.com>
     2
     3        Null-deref crash in DefaultAudioDestinationNode::suspend()
     4        https://bugs.webkit.org/show_bug.cgi?id=154248
     5
     6        Reviewed by Alex Christensen.
     7
     8        Null-check scriptExecutionContext() before deref.
     9
     10        * Modules/webaudio/DefaultAudioDestinationNode.cpp:
     11        (WebCore::DefaultAudioDestinationNode::resume):
     12        (WebCore::DefaultAudioDestinationNode::suspend):
     13        (WebCore::DefaultAudioDestinationNode::close):
     14
    1152016-02-15  Chris Dumez  <cdumez@apple.com>
    216
  • trunk/Source/WebCore/Modules/webaudio/DefaultAudioDestinationNode.cpp

    r182141 r196602  
    112112    if (isInitialized())
    113113        m_destination->start();
    114     context()->scriptExecutionContext()->postTask(function);
     114    if (auto scriptExecutionContext = context()->scriptExecutionContext())
     115        scriptExecutionContext->postTask(function);
    115116}
    116117
     
    120121    if (isInitialized())
    121122        m_destination->stop();
    122     context()->scriptExecutionContext()->postTask(function);
     123    if (auto scriptExecutionContext = context()->scriptExecutionContext())
     124        scriptExecutionContext->postTask(function);
    123125}
    124126
     
    127129    ASSERT(isInitialized());
    128130    uninitialize();
    129     context()->scriptExecutionContext()->postTask(function);
     131    if (auto scriptExecutionContext = context()->scriptExecutionContext())
     132        scriptExecutionContext->postTask(function);
    130133}
    131134
Note: See TracChangeset for help on using the changeset viewer.