<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>199638</bug_id>
          
          <creation_ts>2019-07-09 13:27:51 -0700</creation_ts>
          <short_desc>Stop checking WeakPtr on background thread in SourceBufferPrivateAVFObjC::enqueueSample()</short_desc>
          <delta_ts>2019-08-05 15:46:36 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKit2</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>199517</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Chris Dumez">cdumez</reporter>
          <assigned_to name="Chris Dumez">cdumez</assigned_to>
          <cc>achristensen</cc>
    
    <cc>eric.carlson</cc>
    
    <cc>jer.noble</cc>
    
    <cc>youennf</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1551384</commentid>
    <comment_count>0</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2019-07-09 13:27:51 -0700</bug_when>
    <thetext>Stop checking WeakPtr on background thread in SourceBufferPrivateAVFObjC::enqueueSample():

Thread 14 Crashed:: Dispatch queue: AVSampleBufferDisplayLayerQueueForCallingPrerollCompleteCallback
0   com.apple.JavaScriptCore      	0x000000032f84146e WTFCrash + 14 (Assertions.cpp:305)
1   com.apple.WebCore             	0x000000031800973b WTFCrashWithInfo(int, char const*, char const*, int) + 27
2   com.apple.WebCore             	0x000000031801c7ec WTF::WeakPtrImpl::operator bool() const + 140 (WeakPtr.h:71)
3   com.apple.WebCore             	0x000000031838971e WTF::WeakPtr&lt;WebCore::SourceBufferPrivateAVFObjC&gt;::operator bool() const + 62 (WeakPtr.h:98)
4   com.apple.WebCore             	0x0000000318395d10 WebCore::SourceBufferPrivateAVFObjC::enqueueSample(WTF::Ref&lt;WebCore::MediaSample, WTF::DumbPtrTraits&lt;WebCore::MediaSample&gt; &gt;&amp;&amp;, WTF::AtomString const&amp;)::$_15::operator()(signed char) + 48 (SourceBufferPrivateAVFObjC.mm:1143)
5   com.apple.WebCore             	0x0000000318395cd3 invocation function for block in WebCore::SourceBufferPrivateAVFObjC::enqueueSample(WTF::Ref&lt;WebCore::MediaSample, WTF::DumbPtrTraits&lt;WebCore::MediaSample&gt; &gt;&amp;&amp;, WTF::AtomString const&amp;) + 35 (SourceBufferPrivateAVFObjC.mm:1142)
6   com.apple.avfoundation        	0x00007fff31e8a7d9 __164-[AVSampleBufferDisplayLayer(AVSampleBufferDisplayLayerQueueManagement) _callOldPrerollCompletionHandlerWithSuccess:andSetNewPrerollCompletionHandler:forRequestID:]_block_invoke.326 + 28
7   libdispatch.dylib             	0x00007fff6dad9683 _dispatch_call_block_and_release + 12
8   libdispatch.dylib             	0x00007fff6dada60e _dispatch_client_callout + 8
9   libdispatch.dylib             	0x00007fff6dadfbd2 _dispatch_lane_serial_drain + 597
10  libdispatch.dylib             	0x00007fff6dae0556 _dispatch_lane_invoke + 363
11  libdispatch.dylib             	0x00007fff6dae9bc5 _dispatch_workloop_worker_thread + 582
12  libsystem_pthread.dylib       	0x00007fff6dd33860 _pthread_wqthread + 336
13  libsystem_pthread.dylib       	0x00007fff6dd3369b start_wqthread + 15

This is a WeakPtr for a main thread object so we should only be using the WeakPtr on the main thread.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>