From b8db6988690409a30d624901cb7a38d8be0a03c1 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..37a236118e0 100644 --- a/source +++ b/source @@ -89463,20 +89463,11 @@ dictionary WindowPostMessageOptions : StructuredSeri are:

    -
  1. Let thisTraversable be null.

  2. - -
  3. 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.

  4. - -
  5. -

    If thisTraversable is null, then return.

    +
  6. Let thisTraversable be this's navigable.

  7. -

    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. If thisTraversable is not a top-level traversable, then + return.

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

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

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

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

    then: