Changeset 223896 in webkit


Ignore:
Timestamp:
Oct 24, 2017 10:32:11 AM (6 years ago)
Author:
commit-queue@webkit.org
Message:

RenderThemeCocoa::mediaControlsFormattedStringForDuration may cause a crash due to unhandled Obj-C exception
https://bugs.webkit.org/show_bug.cgi?id=178716
<rdar://problem/35112900>

Patch by Antoine Quint <Antoine Quint> on 2017-10-24
Reviewed by Dean Jackson.

  • rendering/RenderThemeCocoa.mm:

(WebCore::RenderThemeCocoa::mediaControlsFormattedStringForDuration):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r223895 r223896  
     12017-10-24  Antoine Quint  <graouts@apple.com>
     2
     3        RenderThemeCocoa::mediaControlsFormattedStringForDuration may cause a crash due to unhandled Obj-C exception
     4        https://bugs.webkit.org/show_bug.cgi?id=178716
     5        <rdar://problem/35112900>
     6
     7        Reviewed by Dean Jackson.
     8
     9        * rendering/RenderThemeCocoa.mm:
     10        (WebCore::RenderThemeCocoa::mediaControlsFormattedStringForDuration):
     11
    1122017-10-24  Ryosuke Niwa  <rniwa@webkit.org>
    213
  • trunk/Source/WebCore/rendering/RenderThemeCocoa.mm

    r220506 r223896  
    4747#if ENABLE(VIDEO)
    4848#include "LocalizedStrings.h"
     49#include <wtf/BlockObjCExceptions.h>
    4950#endif
    5051
     
    118119        return WEB_UI_STRING("indefinite time", "accessibility help text for an indefinite media controller time value");
    119120
     121    BEGIN_BLOCK_OBJC_EXCEPTIONS;
    120122    if (!m_durationFormatter) {
    121123        m_durationFormatter = adoptNS([NSDateComponentsFormatter new]);
     
    126128    }
    127129    return [m_durationFormatter.get() stringFromTimeInterval:durationInSeconds];
     130    END_BLOCK_OBJC_EXCEPTIONS;
    128131#else
    129132    return emptyString();
Note: See TracChangeset for help on using the changeset viewer.