<?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>141820</bug_id>
          
          <creation_ts>2015-02-19 18:03:24 -0800</creation_ts>
          <short_desc>RunLoop::dispatch() should drop the mutex before calling wakeUp().</short_desc>
          <delta_ts>2015-02-20 11:36:18 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKit Misc.</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</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>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Simon Fraser (smfr)">simon.fraser</reporter>
          <assigned_to name="Simon Fraser (smfr)">simon.fraser</assigned_to>
          <cc>andersca</cc>
    
    <cc>benjamin</cc>
    
    <cc>cmarcelo</cc>
    
    <cc>commit-queue</cc>
    
    <cc>sam</cc>
    
    <cc>simon.fraser</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1070578</commentid>
    <comment_count>0</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2015-02-19 18:03:24 -0800</bug_when>
    <thetext>It&apos;s possible for RunLoop::performWork() to return without handling all the functions in the queue. In that case, CF is going to unset the CFRunLoopSource &quot;signaled&quot; state, which means that source won&apos;t get processed again until RunLoop::dispatch is called.

We should re-signal the source at the end of RunLoop::performWork() if there&apos;s still work to do. This is OK, because CF unsets the signaled bit before it calls us.

Also, RunLoop::dispatch() should drop the mutex before calling wakeUp().</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1070581</commentid>
    <comment_count>1</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2015-02-19 18:28:34 -0800</bug_when>
    <thetext>Never mind. If something was added to the m_functionQueue inside of RunLoop::performWork(), it would have had to have been via RunLoop::dispatch, which would have signaled.

So I&apos;ll just keep this for the mutex fix.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1070583</commentid>
    <comment_count>2</comment_count>
      <attachid>246931</attachid>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2015-02-19 18:32:31 -0800</bug_when>
    <thetext>Created attachment 246931
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1070750</commentid>
    <comment_count>3</comment_count>
      <attachid>246931</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2015-02-20 11:36:13 -0800</bug_when>
    <thetext>Comment on attachment 246931
Patch

Clearing flags on attachment: 246931

Committed r180434: &lt;http://trac.webkit.org/changeset/180434&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1070751</commentid>
    <comment_count>4</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2015-02-20 11:36:18 -0800</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>246931</attachid>
            <date>2015-02-19 18:32:31 -0800</date>
            <delta_ts>2015-02-20 11:36:13 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>bug-141820-20150219183223.patch</filename>
            <type>text/plain</type>
            <size>1367</size>
            <attacher name="Simon Fraser (smfr)">simon.fraser</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMTgwMjI5CmRpZmYgLS1naXQgYS9Tb3VyY2UvV1RGL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