Changeset 180510 in webkit


Ignore:
Timestamp:
Feb 23, 2015, 11:27:36 AM (10 years ago)
Author:
eric.carlson@apple.com
Message:

Occasional crash in MediaPlayer::setPrivateBrowsingMode
https://bugs.webkit.org/show_bug.cgi?id=141910

Reviewed by Jer Noble.

No new tests, I was unable to reproduce the crash.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::stopPeriodicTimers): Use EveryDelayedAction instead of -1.
(WebCore::HTMLMediaElement::stop): Call clearMediaPlayer instead of just setting m_player

to NULL.

  • html/HTMLMediaElement.h: Define EveryDelayedAction.
Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r180503 r180510  
     12015-02-23  Eric Carlson  <eric.carlson@apple.com>
     2
     3        Occasional crash in MediaPlayer::setPrivateBrowsingMode
     4        https://bugs.webkit.org/show_bug.cgi?id=141910
     5
     6        Reviewed by Jer Noble.
     7
     8        No new tests, I was unable to reproduce the crash.
     9
     10        * html/HTMLMediaElement.cpp:
     11        (WebCore::HTMLMediaElement::stopPeriodicTimers): Use EveryDelayedAction instead of -1.
     12        (WebCore::HTMLMediaElement::stop): Call clearMediaPlayer instead of just setting m_player
     13            to NULL.
     14        * html/HTMLMediaElement.h: Define EveryDelayedAction.
     15
    1162015-02-23  Philippe Normand  <pnormand@igalia.com>
    217
  • trunk/Source/WebCore/html/HTMLMediaElement.cpp

    r180416 r180510  
    46314631
    46324632    // 1 - The user agent should cancel the fetching process.
    4633     clearMediaPlayer(-1);
     4633    clearMediaPlayer(EveryDelayedAction);
    46344634
    46354635    // 2 - Set the error attribute to a new MediaError object whose code attribute is set to MEDIA_ERR_ABORTED.
     
    47384738
    47394739    // Once an active DOM object has been stopped it can not be restarted, so we can deallocate
    4740     // the media player now. Note that userCancelledLoad will already have cleared the player
    4741     // if the media was not fully loaded. This handles all other cases.
    4742     m_player = nullptr;
     4740    // the media player now. Note that userCancelledLoad will already called clearMediaPlayer
     4741    // if the media was not fully loaded, but we need the same cleanup if the file was completely
     4742    // loaded and calling it again won't cause any problems.
     4743    clearMediaPlayer(EveryDelayedAction);
    47434744
    47444745    updateSleepDisabling();
  • trunk/Source/WebCore/html/HTMLMediaElement.h

    r180416 r180510  
    138138        TextTrackChangesNotification = 1 << 2,
    139139        ConfigureTextTrackDisplay = 1 << 3,
     140
     141        EveryDelayedAction = LoadMediaResource | ConfigureTextTracks | TextTrackChangesNotification | ConfigureTextTrackDisplay,
    140142    };
    141143    void scheduleDelayedAction(DelayedActionType);
Note: See TracChangeset for help on using the changeset viewer.