script: Fix wrong procedure when deserializing JSValue from mozjs HandleValue (#38943)

Spec: https://w3c.github.io/webdriver/#dfn-internal-json-clone

This PR 
1. moves [clone an
object](https://w3c.github.io/webdriver/#dfn-clone-an-object) to `fn
clone_an_object` to make things clearer.
2. Fixes the bug where we wrongly put `element` and `WindowProxy` as
part of [clone an
object](https://w3c.github.io/webdriver/#dfn-clone-an-object), which
leads to false-positive `JSError` before.
3. Update spec links to correct ones.

Testing: New passing in `{execute_async_script,execute_script}/node.py`

---------

Signed-off-by: Euclid Ye <euclid.ye@huawei.com>
This commit is contained in:
Euclid Ye 2025-08-26 21:48:48 +08:00 committed by GitHub
parent 08b9eb818c
commit 26fb603d15
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 156 additions and 154 deletions

View file

@ -5,12 +5,6 @@
[test_detached_shadow_root[child_context\]]
expected: FAIL
[test_stale_element[top_context\]]
expected: FAIL
[test_stale_element[child_context\]]
expected: FAIL
[test_element_reference[shadow-root\]]
expected: FAIL

View file

@ -5,12 +5,6 @@
[test_detached_shadow_root[child_context\]]
expected: FAIL
[test_stale_element[top_context\]]
expected: FAIL
[test_stale_element[child_context\]]
expected: FAIL
[test_web_reference[shadow-root\]]
expected: FAIL