<?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>282980</bug_id>
          
          <creation_ts>2024-11-12 03:17:34 -0800</creation_ts>
          <short_desc>[WebDriver][BiDi] Implement log events buffering</short_desc>
          <delta_ts>2025-02-19 21:56:02 -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>WebDriver</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>271956</dependson>
          <blocked>288068</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Lauro Moura">lmoura</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bburg</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2074478</commentid>
    <comment_count>0</comment_count>
    <who name="Lauro Moura">lmoura</who>
    <bug_when>2024-11-12 03:17:34 -0800</bug_when>
    <thetext>https://w3c.github.io/webdriver-bidi/#module-log

&gt; A BiDi Session has a log event buffer which is a map from navigable id to a list of log events for that context that have not been emitted. User agents may impose a maximum size on this buffer, subject to the condition that if events A and B happen in the same context with A occurring before B, and both are added to the buffer, the entry for B must not be removed before the entry for A.

From `log.entryAdded` event definition: https://w3c.github.io/webdriver-bidi/#event-log-entryAdded

&gt; 16. If event is enabled with session, &quot;log.entryAdded&quot; and related navigables, emit an event with session and body.

&gt;     Otherwise, buffer a log event with session, related browsing contexts, and body.

Storing events in buffer spec: https://w3c.github.io/webdriver-bidi/#buffer-a-log-event

And in the end of `log.entryAdded` spec we have the definition of emitting these buffered events, which happen at the &quot;remote end subscribe steps&quot;, with priority 10. That is, when the user subscribes to `log.entryAdded`, the remote end &quot;flushes&quot; the buffered events in order back to the client.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2076093</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2024-11-19 03:18:27 -0800</bug_when>
    <thetext>&lt;rdar://problem/140188887&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>