From a41acdad52dbeebb7c4661c987b29eaba7045533 Mon Sep 17 00:00:00 2001 From: Domenic Denicola Date: Fri, 21 Jun 2024 17:55:27 +0900 Subject: [PATCH] Fix window.close() navigable reference Also clean up the initial steps by using some convenience definitions. Closes #10418. Note that this does not help with #1866. --- source | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/source b/source index 809aeb97590..eab6b8d5f1d 100644 --- a/source +++ b/source @@ -89463,20 +89463,11 @@ dictionary WindowPostMessageOptions : StructuredSeri are:

    -
  1. Let thisTraversable be null.

  2. +
  3. Let thisTraversable be this's navigable.

  4. -
  5. For each top-level traversable - traversable of the user agent's top-level traversable set: if - traversable's active document's relevant - global object equals this, then set thisTraversable to - traversable and break.

  6. - -
  7. -

    If thisTraversable is null, then return.

    - -

    In this case the method is being called on a Window that does not - correspond to a top-level traversable, and so closing is not allowed.

    -
  8. +
  9. If thisTraversable is not a top-level traversable, then + return.

  10. If thisTraversable's is closing is true, then return.

  11. @@ -89498,8 +89489,9 @@ dictionary WindowPostMessageOptions : StructuredSeri browsingContext; and

  12. the incumbent global - object's node navigable is allowed by sandboxing to navigate - thisTraversable, given sourceSnapshotParams

  13. + object
    's navigable is allowed by + sandboxing to navigate thisTraversable, given + sourceSnapshotParams

    then: