Skip to content

getNotifications manipulates ES arrays in parallel steps #113

Closed

Description

@bzbarsky

https://notifications.spec.whatwg.org/#dom-serviceworkerregistration-getnotifications is manipulating and ES array in parallel steps. It says things like "push that object to objects". How is that supposed to work? Is that using Array.prototype.push? If so, is it using the initial value of that? Even if it does, that can be affected by accessor properties on Array.prototype and in particular can run arbitrary script, which is not OK in parallel.

Activity

  1. annevk commented on Dec 5, 2017

    @annevk
    Member

    It also doesn't queue a step to resolve the promise... (Although promises in general are underdefined I suppose.)

    I think what this should do instead is to just build up a list and resolve the promise with that and let the IDL layer take care of converting the list to a new Array.

  2. added
    good first issueIdeal for someone new to a WHATWG standard or software project
    on Dec 5, 2017
  3. annevk commented on Dec 5, 2017

    @annevk
    Member

    Using https://infra.spec.whatwg.org/ terminology to make such a list this should be relatively straightforward.

  4. added 2 commits that reference this issue on Feb 27, 2018
    f0ab42a
    8dd26f5
  5. added a commit that references this issue on Feb 3, 2021
    fe39200
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

    good first issueIdeal for someone new to a WHATWG standard or software project

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions