Skip to content

InstallEvent.addRoutes is resolving/rejecting the returned promise synchronously #1742

@youennf

Description

@youennf

addRoutes currently returns a promise without using the ability to resolve/reject the promise asynchronously.
Looking at Chromium implementation, it seems that the promise is resolved asynchronously (probably after storing the route out of process).

The spec could be written as follows:

  1. Validate parameters synchronously, reject as needed (like current spec)
  2. If parameters are valid, In parallel, try storing the new route
  3. If storing the route fails, queue a task to reject the promise
  4. Otherwise, queue a task to resolve the promise

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