Skip to content

"check if an access between two browsing contexts should be reported" can be called with null browsing context but doesn't handle it #10192

Open
@awesomekling

Description

@awesomekling

The check if an access between two browsing contexts should be reported operation can be called with the accessed browsing context being null.

Here's an example scenario where this happens:

<!doctype html><script>
window.onload = function() {
    let iframe = document.querySelector("iframe")
    let iframeWindow = iframe.contentWindow;
    iframe.remove();
    iframeWindow.foo;
}
</script><iframe></iframe>

After the call to iframe.remove(); above, the iframeWindow no longer has an associated browsing context. (This happens because the iframe removing steps invokes destroy a child navigable, which ends up severing the link between the iframe's document and its browsing context.

Yet when evaluating iframeWindow.foo, we end up in 7.2.3.7 [[Get]] ( P, Receiver ) where the following happens:

  1. Let W be the value of the [[Window]] internal slot of this.

  2. Check if an access between two browsing contexts should be reported, given the current global object's browsing context, W's browsing context, P, and the current settings object.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions