From efe6b9badd864ad236d8f30a2ccf98554906bbda Mon Sep 17 00:00:00 2001 From: Anne van Kesteren Date: Wed, 16 Oct 2019 09:36:52 +0200 Subject: [PATCH] Make window.window/frames/self deal with no browsing context Before this change these getters did not account for Window object's browsing context potentially being null, resulting in a conceptual crash. Language from https://github.com/tc39/ecma262/pull/702. Tests: https://github.com/web-platform-tests/wpt/pull/15720. Helps with #4363. --- source | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/source b/source index 7fbd5f807b8..654eb0d4381 100644 --- a/source +++ b/source @@ -3015,6 +3015,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
  • JavaScript execution context
  • JavaScript execution context stack
  • JavaScript realm
  • +
  • EnvironmentRecord
  • NewTarget
  • running JavaScript execution context
  • surrounding agent
  • @@ -79756,9 +79757,10 @@ dictionary WindowPostMessageOptions : PostMessageOptions browsing context.

    The window, frames, and self IDL - attributes, on getting, must all return this Window object's browsing - context's WindowProxy object.

    + data-x="dom-frames">frames, and self + attributes' getters must return this Window object's relevant Realm.[[GlobalEnv]]'s + EnvironmentRecord's [[GlobalThisValue]].

    The document IDL attribute, on getting, must return this Window object's associated