<?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>171363</bug_id>
          
          <creation_ts>2017-04-26 20:04:10 -0700</creation_ts>
          <short_desc>Web Inspector: ASSERT(!m_startedComposite) fails when recording on non-Cocoa Timeline</short_desc>
          <delta_ts>2017-05-01 16:54:35 -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>Web Inspector</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</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="Ross Kirsling">ross.kirsling</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bburg</cc>
    
    <cc>commit-queue</cc>
    
    <cc>fujii</cc>
    
    <cc>inspector-bugzilla-changes</cc>
    
    <cc>mattbaker</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1301909</commentid>
    <comment_count>0</comment_count>
    <who name="Ross Kirsling">ross.kirsling</who>
    <bug_when>2017-04-26 20:04:10 -0700</bug_when>
    <thetext>It appears that when compositing events were implemented, this wasn&apos;t done in an entirely safe fashion for non-Cocoa platforms:
https://bugs.webkit.org/show_bug.cgi?id=146168

Specifically, the asserts for InspectorTimelineAgent::willComposite and InspectorTimelineAgent::didComposite ensure that one is not used without the other, yet didComposite is called within a PLATFORM(COCOA) block while willComposite is called on all platforms.

Asserts:                https://trac.webkit.org/browser/webkit/trunk/Source/WebCore/inspector/InspectorTimelineAgent.cpp#L358
didComposite callsite:  https://trac.webkit.org/browser/webkit/trunk/Source/WebCore/inspector/InspectorTimelineAgent.cpp#L196
willComposite callsite: https://trac.webkit.org/browser/webkit/trunk/Source/WebCore/page/FrameView.cpp#L1234

As such, on any non-Cocoa platform, the second compositing event in a timeline recording causes an assertion failure.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1301910</commentid>
    <comment_count>1</comment_count>
    <who name="Ross Kirsling">ross.kirsling</who>
    <bug_when>2017-04-26 20:04:24 -0700</bug_when>
    <thetext>Compositing events are Cocoa-specific until we have platform abstraction for RunLoopObserver:
https://bugs.webkit.org/show_bug.cgi?id=142748

Therefore we should simply guard the willComposite callsite for now.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1301921</commentid>
    <comment_count>2</comment_count>
      <attachid>308327</attachid>
    <who name="Ross Kirsling">ross.kirsling</who>
    <bug_when>2017-04-26 20:18:37 -0700</bug_when>
    <thetext>Created attachment 308327
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1302389</commentid>
    <comment_count>3</comment_count>
    <who name="Blaze Burg">bburg</who>
    <bug_when>2017-04-27 16:39:57 -0700</bug_when>
    <thetext>I&apos;d like Matt to review this when he&apos;s back in office next week.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1303483</commentid>
    <comment_count>4</comment_count>
      <attachid>308327</attachid>
    <who name="Matt Baker">mattbaker</who>
    <bug_when>2017-05-01 16:25:21 -0700</bug_when>
    <thetext>Comment on attachment 308327
Patch

r=me.

I don&apos;t have an easy way to test this, but it seems clear that the second time willComposite is called (and every time after) it will assert, since didComposite is never called. Ross&apos;s patch matches the guards around the creation of the run loop observation points and looks correct.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1303496</commentid>
    <comment_count>5</comment_count>
      <attachid>308327</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2017-05-01 16:54:34 -0700</bug_when>
    <thetext>Comment on attachment 308327
Patch

Clearing flags on attachment: 308327

Committed r216043: &lt;http://trac.webkit.org/changeset/216043&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1303497</commentid>
    <comment_count>6</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2017-05-01 16:54:35 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>308327</attachid>
            <date>2017-04-26 20:18:37 -0700</date>
            <delta_ts>2017-05-01 16:54:34 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-171363-20170426201836.patch</filename>
            <type>text/plain</type>
            <size>1397</size>
            <attacher name="Ross Kirsling">ross.kirsling</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMjE1Nzc4CmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViQ29yZS9D
aGFuZ2VMb2cgYi9Tb3VyY2UvV2ViQ29yZS9DaGFuZ2VMb2cKaW5kZXggYTdjOTEwYjJhYjQ1YWMx
YTZlNDEzYzM2Y2VhOWU5YTEwNjhjYmFjMS4uZjllZjFiMjQ5ODQyZWE3NTMwN2YxMjJjNjI3MWU4
MTQwYmNlMzYwMyAxMDA2NDQKLS0tIGEvU291cmNlL1dlYkNvcmUvQ2hhbmdlTG9nCisrKyBiL1Nv
dXJjZS9XZWJDb3JlL0NoYW5nZUxvZwpAQCAtMSwzICsxLDEzIEBACisyMDE3LTA0LTI2ICBSb3Nz
IEtpcnNsaW5nICA8cm9zcy5raXJzbGluZ0Bzb255LmNvbT4KKworICAgICAgICBXZWIgSW5zcGVj
dG9yOiBBU1NFUlQoIW1fc3RhcnRlZENvbXBvc2l0ZSkgZmFpbHMgd2hlbiByZWNvcmRpbmcgb24g
bm9uLUNvY29hIFRpbWVsaW5lCisgIC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