Skip to content

object webidl argument should use Handle insteadObject of raw pointer #46019

Open

Description

@jdm

Promise<PermissionStatus> query(object permissionDesc);
Promise<PermissionStatus> request(object permissionDesc);
Promise<PermissionStatus> revoke(object permissionDesc);

fn Query(&self, cx: &mut CurrentRealm, permission_desc: *mut JSObject) -> Rc<Promise> {
self.manipulate(cx, Operation::Query, permission_desc, None)
}
/// <https://w3c.github.io/permissions/#dom-permissions-request>
fn Request(&self, cx: &mut CurrentRealm, permission_desc: *mut JSObject) -> Rc<Promise> {
self.manipulate(cx, Operation::Request, permission_desc, None)
}
/// <https://w3c.github.io/permissions/#dom-permissions-revoke>
fn Revoke(&self, cx: &mut CurrentRealm, permission_desc: *mut JSObject) -> Rc<Promise> {
self.manipulate(cx, Operation::Revoke, permission_desc, None)
}

Activity

  1. added
    A-content/bindings
    I-safety
    on Jun 27, 2026
  2. jdm commented on Jun 27, 2026

    @jdm
    MemberAuthor

    # TODO: Need to root somehow
    # https://github.com/servo/servo/issues/6382
    declType = CGGeneric("*mut JSObject")

  3. sagudev commented on Jun 27, 2026

    @sagudev
    Member

    Actually we do not need to always root it (if function does not take cx), but that happens rarely if even.

  4. self-assigned this
    on Jul 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

A-content/bindingsI-safety

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions