Skip to content

The Setter probably should still define without ErrorData slot.  #2

Closed

Description

@mgaudet

This looks like pretty much exactly what I was hoping for.

One nit: I suspect the setter needs a different definition (which doesn't throw if there's no [[ErrorData]] internal slot), based on this comment in our source code.

Activity

  1. ljharb commented on Jan 9, 2025

    @ljharb
    Member

    Given that other browsers don't have a mutator at all, is there a reason we're stuck with that lax choice? It'd be much nicer to tighten this up if possible.

  2. mgaudet commented on Jan 9, 2025

    @mgaudet
    Author

    The comment is a hint that there's use out there; but we don't have telemetry to help with this.

  3. ljharb commented on Jan 9, 2025

    @ljharb
    Member

    Fair. I can't figure out how to navigate the git history on that interface across a file move; is there any more context in the commit that added the comment?

  4. ljharb commented on Jan 9, 2025

    @ljharb
    Member

    What is "an Xray to an Error object"?

  5. ljharb commented on Jan 9, 2025

    @ljharb
    Member

    ok, so it seems that https://bugzilla.mozilla.org/show_bug.cgi?id=1038238#c28 is the relevant comment - it's now been a decade since class extends Error was an option, so per the hope in the comment, maybe people have moved on :-) obv that might be overly optimistic. Getting some telemetry on this would be really helpful.

  6. ljharb commented on Jan 9, 2025

    @ljharb
    Member

    wait, actually - the current spec in this proposal has 1. If _E_ does not have an [[ErrorData]] internal slot, return *undefined*. in both the getter and the setter, so i think this and #3 are both fine to close?

  7. mgaudet commented on Jan 9, 2025

    @mgaudet
    Author

    ...

    You are right that it doesn't throw. I must have misread this morning.

    It doesn't -define- though, which IMO would still be quite odd.

  8. mgaudet commented on Jan 9, 2025

    @mgaudet
    Author

    (#3 is still at the very least a potential web compat issue)

  9. changed the title [-]The Setter probably shouldn't throw without an [[ErrorData]] slot. [/-] [+]The Setter probably should still define without ErrorData slot. [/+] on Jan 9, 2025
  10. ljharb commented on Jan 9, 2025

    @ljharb
    Member

    ah - so you're suggesting that when there's no slot (and when it's not being invoked on itself), it should just define an own data property?

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions