diff --git a/source b/source index 48aa78d4f76..1c1cc84f809 100644 --- a/source +++ b/source @@ -101503,17 +101503,25 @@ interface NavigationDestination {
  • -

    If apiMethodTracker is not null:

    +

    If apiMethodTracker is null:

      -
    1. Set navigation's ongoing API method tracker to - apiMethodTracker.

    2. +
    3. Let info be undefined.

    4. -
    5. Set apiMethodTracker's pending to false.

    6. +
    7. Let serializedState be null.

    8. + +
    9. Set apiMethodTracker to the result of setting up a navigate/reload API method tracker for + this given info and serializedState.

  • +
  • Set navigation's ongoing API method tracker to + apiMethodTracker.

  • + +
  • Set apiMethodTracker's pending to false.

  • +
  • Let navigable be navigation's relevant global object's navigable.

  • @@ -101574,10 +101582,8 @@ interface NavigationDestination { downloadRequestFilename.

  • -

    If apiMethodTracker is not null, then initialize event's info to apiMethodTracker's info. Otherwise, initialize it to - undefined.

    +

    Initialize event's info to + apiMethodTracker's info.

    At this point apiMethodTracker's info is no longer needed and can be nulled @@ -101772,6 +101778,8 @@ interface NavigationDestination { apiMethodTracker:

      +
    1. Assert: apiMethodTracker is not null.

    2. +
    3. Let navigation be event's target.

    4. @@ -101911,6 +101919,10 @@ interface NavigationDestination {
      1. Let promisesList be an empty list.

      2. +
      3. Append apiMethodTracker's committed promise to + promisesList.

      4. +
      5. For each handler of event's navigation handler list:

        @@ -101922,23 +101934,6 @@ interface NavigationDestination {
      -
    5. -

      If promisesList's size is 0, then set - promisesList to « a promise resolved with undefined ».

      - -

      There is a subtle timing difference between how waiting for all schedules its success and failure steps when given zero promises - versus ≥1 promises. For most uses of waiting for all, this - does not matter. However, with this API, there are so many events and promise handlers which - could fire around the same time that the difference is pretty easily observable: it can cause - the event/promise handler sequence to vary. (Some of the events and promises involved include: - navigatesuccess / navigateerror, currententrychange, dispose, apiMethodTracker's promises, and the navigation.transition.finished promise.) -

    6. -
    7. Wait for all of promisesList, with the following success steps:

      @@ -101959,8 +101954,7 @@ interface NavigationDestination {
    8. Finish event given true.

    9. -
    10. If apiMethodTracker is non-null, then resolve the finished - promise for apiMethodTracker.

    11. +
    12. Resolve the finished promise for apiMethodTracker.

    13. Fire an event named navigatesuccess at navigation.

    14. @@ -101981,8 +101975,7 @@ interface NavigationDestination {
  • -
  • Otherwise, if apiMethodTracker is non-null, then clean up +

  • Clean up apiMethodTracker.