Skip to content

Feedback on web compatibility #10

Closed

Description

@dminor

In https://bugzilla.mozilla.org/show_bug.cgi?id=1942684, we added use counters to track existing use of Error.stack on the web. This telemetry has been in release for a while, and the results are stable.

Image

Looking at the Error.stack getter data, it's almost certainly ok to require an [[ErrorData]] slot.

Image

Looking at the Error.stack setter data, hardly anyone is using the setter, but most of those uses are on objects that don't have an [[ErrorData]] slot, and about 7 percent or so are calling the setter with a non-string argument.

Hopefully this data is useful in making decisions about the shape of the API. Unless I hear otherwise, I'm going to remove this telemetry in Firefox 142, I think it's served it's purpose.

Activity

  1. ljharb commented on Jun 20, 2025

    @ljharb
    Member

    Awesome, thank you for this data! Perfectly fine to remove the telemetry.

    Based on this data, I draw the following conclusions:

    If these conclusions seem correct, then I'll prepare a PR with these changes to discuss in the next plenary.

  2. dminor commented on Jun 20, 2025

    @dminor
    Author

    For the setter, it's so seldom used, I'm not sure we need to worry about breaking people, looking at yesterday's data we saw around 2.7 billion uses of the getter on 55.3 billion documents, and only 14240 uses of the setter.

    That seems insignificant from a web compatibility point of view, so I'd support requiring a string argument, for instance.

  3. ljharb commented on Jun 20, 2025

    @ljharb
    Member

    OK, great! What do you think about #2, ie throwing or noop-ing with a slotless object?

  4. dminor commented on Jun 23, 2025

    @dminor
    Author

    I think we should be consistent with the design choice for the getter, so I'd say throw in that case.

  5. mhofman commented on Jul 11, 2025

    @mhofman
    Member

    If the use of setter is so seldom, would it be considerable to not implement a setter at all?

  6. dminor commented on Jul 11, 2025

    @dminor
    Author

    If the use of setter is so seldom, would it be considerable to not implement a setter at all?

    I think that's worth considering.

  7. ljharb commented on Jul 11, 2025

    @ljharb
    Member

    I suppose that would be a sloppy noop and a strict exception, if we shipped a getter and no setter - is that acceptable?

  8. ljharb commented on Nov 5, 2025

    @ljharb
    Member

    ping @dminor?

  9. ljharb commented on Nov 5, 2025

    @ljharb
    Member

    We discussed this in TG3 today and came to the conclusion that a setter that installs an own data property on the receiver should indeed be included in this proposal. It is likely that it will be the same intrinsic/function object that captureStackTrace installs as a setter, for the same reasons.

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