Skip to content
  • Tom Tung's avatar
    Bug 1624266 - Use IsSharedMemoryAllowed to decide whether should the CTOR... · 66326fe6
    Tom Tung authored
    Bug 1624266 -  Use IsSharedMemoryAllowed to decide whether should the CTOR SharedArrayBuffer be defined for Window; r=nika
    
    We set opener policy from the channel of the new document when creating a
    WindowGlobalChild. However, we need to check if it's crossOriginIsolated even
    when the WindowGlobalChild hasn't been created for the new inner window in some
    cases.
    
    To avoid checking the unset value of opener policy from the BrowsingContext,
    this patch moves the setting the opener policy right before creating a native
    global for a new inner window. So that the value of opener policy should always
    be correct when validating it (IsSharedMemoryAllowed).
    
    Differential Revision: https://phabricator.services.mozilla.com/D71534
    66326fe6