<?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>282979</bug_id>
          
          <creation_ts>2024-11-12 02:41:09 -0800</creation_ts>
          <short_desc>[WebDriver][BiDi] Support getting the stack trace for assert, error, trace and warn messages log.entryEvents</short_desc>
          <delta_ts>2025-02-19 21:55:55 -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>2074474</commentid>
    <comment_count>0</comment_count>
    <who name="Lauro Moura">lmoura</who>
    <bug_when>2024-11-12 02:41:09 -0800</bug_when>
    <thetext>https://w3c.github.io/webdriver-bidi/#event-log-entryAdded

&gt; 11. If method is &quot;assert&quot;, &quot;error&quot;, &quot;trace&quot;, or &quot;warn&quot;, let stack be the current stack trace. Otherwise let stack be null.

https://w3c.github.io/webdriver-bidi/#current-stack-trace

The current stack trace is the result of construct a stack trace given a list of stack frames representing the callstack of the running execution context.

https://w3c.github.io/webdriver-bidi/#construct-a-stack-trace

To construct a stack trace, with a list of stack frames stack:

   1. Let call frames be a new list.
   2. For each stack frame frame in stack, starting from the most recently executed frame, run the following steps:
       1. Let url be the result of running the URL serializer, given the URL of frame’s script url.
       2. Let frame info be a new map matching the script.StackFrame production, with the url field set to url, the functionName field set to frame’s function, the lineNumber field set to frame’s line number and the columnNumber field set to frame’s column number.
    3. Append frame info to call frames.
    4. Let stack trace be a new map matching the script.StackTrace production, with the callFrames property set to call frames.
    5. Return stack trace.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2076090</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2024-11-19 02:42:14 -0800</bug_when>
    <thetext>&lt;rdar://problem/140187454&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>