Changeset 228708 in webkit


Ignore:
Timestamp:
Feb 19, 2018 1:03:39 PM (6 years ago)
Author:
Chris Dumez
Message:

CrashTracer: com.apple.WebKit.WebContent at WebCore: WebCore::TimerBase::~TimerBase
https://bugs.webkit.org/show_bug.cgi?id=182931
<rdar://problem/37602962>

Reviewed by Antti Koivisto.

Make sure PlatformMediaResource is ThreadSafeRefCounted since it is being
used from several threads in WebCoreNSURLSession. Also make sure it is
always destroyed on the main thread since it ends up destroying a
CachedRawResource object.

No new tests, no known reproduction case.

  • platform/graphics/PlatformMediaResourceLoader.h:
  • platform/network/cocoa/WebCoreNSURLSession.mm:

(-[WebCoreNSURLSessionDataTask dealloc]):

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r228704 r228708  
     12018-02-19  Chris Dumez  <cdumez@apple.com>
     2
     3        CrashTracer: com.apple.WebKit.WebContent at WebCore: WebCore::TimerBase::~TimerBase
     4        https://bugs.webkit.org/show_bug.cgi?id=182931
     5        <rdar://problem/37602962>
     6
     7        Reviewed by Antti Koivisto.
     8
     9        Make sure PlatformMediaResource is ThreadSafeRefCounted since it is being
     10        used from several threads in WebCoreNSURLSession. Also make sure it is
     11        always destroyed on the main thread since it ends up destroying a
     12        CachedRawResource object.
     13
     14        No new tests, no known reproduction case.
     15
     16        * platform/graphics/PlatformMediaResourceLoader.h:
     17        * platform/network/cocoa/WebCoreNSURLSession.mm:
     18        (-[WebCoreNSURLSessionDataTask dealloc]):
     19
    1202018-02-19  Zalan Bujtas  <zalan@apple.com>
    221
  • trunk/Source/WebCore/platform/graphics/PlatformMediaResourceLoader.h

    r226508 r228708  
    7171};
    7272
    73 class PlatformMediaResource : public RefCounted<PlatformMediaResource> {
     73class PlatformMediaResource : public ThreadSafeRefCounted<PlatformMediaResource> {
    7474    WTF_MAKE_NONCOPYABLE(PlatformMediaResource); WTF_MAKE_FAST_ALLOCATED;
    7575public:
  • trunk/Source/WebCore/platform/network/cocoa/WebCoreNSURLSession.mm

    r228150 r228708  
    540540    [_error release];
    541541    [_taskDescription release];
     542    callOnMainThread([resource = WTFMove(_resource)] { });
    542543    [super dealloc];
    543544}
Note: See TracChangeset for help on using the changeset viewer.