<?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>304548</bug_id>
          
          <creation_ts>2025-12-20 07:35:47 -0800</creation_ts>
          <short_desc>[WebDriver][BiDi] script test_exception_details are asserting on the callback result</short_desc>
          <delta_ts>2025-12-30 08:50:44 -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>
          
          <blocked>281932</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Lauro Moura">lmoura</reporter>
          <assigned_to name="Lauro Moura">lmoura</assigned_to>
          <cc>bburg</cc>
    
    <cc>serge.deh</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2167550</commentid>
    <comment_count>0</comment_count>
    <who name="Lauro Moura">lmoura</who>
    <bug_when>2025-12-20 07:35:47 -0800</bug_when>
    <thetext>imported/w3c/webdriver/tests/bidi/script/evaluate/exception_details_await_promise.py

Test cases:

test_exception_details_await_promise[undefined-expected0]
test_exception_details_await_promise[null-expected1]
test_exception_details_await_promise[NaN-expected4]
test_exception_details_await_promise[-0-expected5]
test_exception_details_await_promise[Infinity-expected6]
test_exception_details_await_promise[-Infinity-expected7]
test_exception_details_await_promise[3-expected8]
test_exception_details_await_promise[1.4-expected9]
test_exception_details_await_promise[true-expected10]
test_exception_details_await_promise[false-expected11]
test_exception_details_await_promise[42n-expected12]
test_exception_details_await_promise[(Symbol(&apos;foo&apos;))-expected13]

Assertion:

webkitpy.webdriver_tests.webdriver_w3c_executor: [DEBUG] (WPEWebDriver:971273): ASSERTION FAILED: JSValueIsObject(context, arguments[2]) || JSValueIsString(context, arguments[2])
webkitpy.webdriver_tests.webdriver_w3c_executor: [DEBUG] (WPEWebDriver:971273): ../../../Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.cpp(219) : const OpaqueJSValue* WebKit::evaluateJavaScriptCallback(JSContextRef, JSObjectRef, JSObjectRef, size_t, const OpaqueJSValue* const*, const OpaqueJSValu
e**)                                                                                                                                                                                                                                                                                                                     
webkitpy.webdriver_tests.webdriver_w3c_executor: [DEBUG] (WPEWebDriver:971273): 1   0x797ab8788914 WebKit::evaluateJavaScriptCallback(OpaqueJSContext const*, OpaqueJSValue*, OpaqueJSValue*, unsigned long, OpaqueJSValue const* const*, OpaqueJSValue const**)                                                         
webkitpy.webdriver_tests.webdriver_w3c_executor: [DEBUG] (WPEWebDriver:971273): 2   0x797ab8c314b5 long JSC::APICallbackFunction::callImpl&lt;JSC::JSCallbackFunction&gt;(JSC::JSGlobalObject*, JSC::CallFrame*)
webkitpy.webdriver_tests.webdriver_w3c_executor: [DEBUG] (WPEWebDriver:971273): 3   0x797a5ec0c327 ???

In this case, the value received from JS is `undefined`.

Could not detect yet when this was introduced. Maybe it&apos;s related to the serialization algorithm (bug282977).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2167560</commentid>
    <comment_count>1</comment_count>
    <who name="Lauro Moura">lmoura</who>
    <bug_when>2025-12-20 10:28:01 -0800</bug_when>
    <thetext>Also affecting script.call_function, for:

test_exception_details[undefined-expected0]
test_exception_details[null-expected1]&quot;
test_exception_details[NaN-expected4]
test_exception_details[-0-expected5]
test_exception_details[Infinity-expected6]
test_exception_details[-Infinity-expected7]
test_exception_details[3-expected8]
test_exception_details[1.4-expected9]
test_exception_details[true-expected10]
test_exception_details[false-expected11]
test_exception_details[42n-expected12]
test_exception_details[(Symbol(&apos;foo&apos;))-expected13]</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2167564</commentid>
    <comment_count>2</comment_count>
    <who name="Lauro Moura">lmoura</who>
    <bug_when>2025-12-20 11:02:57 -0800</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/55752</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2167565</commentid>
    <comment_count>3</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2025-12-20 11:05:52 -0800</bug_when>
    <thetext>Test gardening commit 304823@main (6bf20d103daf): &lt;https://commits.webkit.org/304823@main&gt;

Reviewed commits have been landed. Closing PR #55752 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2168342</commentid>
    <comment_count>4</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2025-12-27 07:36:12 -0800</bug_when>
    <thetext>&lt;rdar://problem/167235256&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>