Skip to content

Use JS::IsArgumentsObject in webdriver code #47448

Closed

Description

@jdm

https://docs.rs/mozjs/latest/mozjs/rust/wrappers2/fn.IsArgumentsObject.html

fn is_arguments_object(cx: &mut JSContext, value: HandleValue) -> bool {
rooted!(&in(cx) let class_name = unsafe { ToString(cx, value) });
let Some(class_name) = NonNull::new(class_name.get()) else {
return false;
};
let class_name = unsafe { jsstr_to_string(cx, class_name) };
class_name == "[object Arguments]"

No need to roll our own check here. There should be no behaviour change to the webdriver tests in tests/wpt tests/webdriver/classic.

Activity

  1. servo-highfive commented on Aug 22, 2026

    @servo-highfive

    Hi! If you have any questions regarding this issue, feel free to make a comment here, or ask it in Zulip.

    If you intend to work on this issue, then add @servo-highfive: assign me to your comment, and I'll assign this to you. 😄

    Please read our policy on AI contributions before getting started.

  2. added a commit that references this issue on Aug 25, 2026
    5b05da3
  3. added a commit that references this issue on Oct 6, 2026
    e9aa5cb
  4. added a commit that references this issue on Oct 12, 2026
    6289b88
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-webdriverE-less-complexStraightforward. Recommended for a new contributor.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions