From c8bb7d8f6cb4ae35c86dea7126b44491b6b56bf2 Mon Sep 17 00:00:00 2001 From: Dave Tapuska Date: Mon, 13 May 2019 15:48:48 -0400 Subject: [PATCH] Add code to allocate agent clusters. Store shared agent clusters in the browsing context group via a map of scheme & registrable domain. Hook the document initialization methods to obtain a similar-orgin window agent. Fixes #4361 --- source | 174 ++++++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 134 insertions(+), 40 deletions(-) diff --git a/source b/source index d25f1b6eb58..ec7ba387cce 100644 --- a/source +++ b/source @@ -2640,6 +2640,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
  • Origin of URLs
  • Absolute URL
  • Relative URL
  • +
  • registrable domain
  • The URL parser and basic URL @@ -77891,8 +77892,26 @@ dictionary DragEventInit : MouseEventInit {
    +

    To determine the origin, given browsing + contextbrowsingContext and sandboxing flag set + sandboxFlags:

    + +
      +
    1. Let origin be null.

    2. + +
    3. If sandboxFlags has its sandboxed origin browsing context flag + unset, set origin to be browsingContext's creator + origin.

    4. + +
    5. If origin is null, set origin to be a unique opaque origin.

    6. + +
    7. Return origin.

    8. +
    +

    To create a new browsing context, given - null or a Document object creator:

    + null or a Document object creator, browsing context group + group:

    1. Let browsingContext be a new browsing context.

    2. @@ -77906,9 +77925,19 @@ dictionary DragEventInit : MouseEventInit { return creator's referrer policy.

      +
    3. Let sandboxFlags be the result of determining active sandboxing + flags given browsingContext.

    4. + +
    5. Let origin be the result of determining the origin given + browsingContext and sandboxFlags. + +

    6. Let agent be the result of obtaining a similar-origin window agent given + origin, and group.

    7. +
    8. Let realm execution context be the result of creating a new JavaScript - realm with the following customizations:

      + realm provided agent with the following customizations: