Skip to content

WebIDL impl: remove unsafe JSObject from return value of Document::NamedGetter #30890

Closed

Description

@gterzian

Part of #30862

Same as #30889

fn NamedGetter(&self, _cx: JSContext, name: DOMString) -> Option<NonNull<JSObject>> {

Should return an enum of specific types. See https://html.spec.whatwg.org/multipage/dom.html#dom-tree-accessors%3Adom-document-nameditem-filter

Activity

  1. added
    I-safety
    A-content/script
    L-javascript
    on Dec 19, 2023
  2. changed the title [-]WebIDL impl: replace use of NonNull<JSObject> with[/-] [+]WebIDL impl: remove unsafe JSObject from return value of Document::NamedGetter[/+] on Dec 19, 2023
  3. eerii commented on Mar 12, 2024

    @eerii
    Member

    I'd like to try to tackle this if that's ok!

  4. gterzian commented on Mar 12, 2024

    @gterzian
    MemberAuthor

    Great! There have been quite a few related PR's merged in recently, and they can server as a guide(although this one is a bit different). See https://github.com/servo/servo/pulls?q=is%3Apr+is%3Aclosed+WebIDL

    Let me know if you have other questions.

    For how to create an enum-like structure, see for example

    typedef (DOMString or unsigned long) BluetoothServiceUUID;

  5. eerii commented on Mar 13, 2024

    @eerii
    Member

    Thank you so much for the references! I'll get to it

  6. eerii commented on Mar 23, 2024

    @eerii
    Member

    I am sorry for the delay, I was trying to understand how WebIDL worked so I took other projects related to codegen first. Hopefully the pr does the necessary modifications, but I would appreciate any corrections since this is my first time modifying WebIDL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

A-content/scriptI-safetyL-javascript

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions