[Webkit-unassigned] [Bug 32368] Add defensive initialization of iframe sandbox flags

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Jan 10 16:11:32 PST 2010


Darin Adler <darin at apple.com> changed:

           What    |Removed                     |Added
  Attachment #46242|review?                     |review+
               Flag|                            |

--- Comment #4 from Darin Adler <darin at apple.com>  2010-01-10 16:11:32 PST ---
(From update of attachment 46242)
>      if (shouldTreatURLSchemeAsNoAccess(m_protocol))
>          m_isUnique = true;
> -    // If this ASSERT becomes false in the future, please consider the impact
> -    // of m_sandoxFlags on m_isUnique.
> -    ASSERT(m_sandboxFlags == SandboxNone);
> +    if (isSandboxed(SandboxOrigin))
> +        m_isUnique = true;

I suggest initializing m_unique to the correct value from the outset.

    m_isUnique(shouldTreatURLSchemeAsNoAccess(m_protocol) ||

To some the if statements may be slightly clearer, so it seems OK to leave it
this way if you think that way.

> +    static PassRefPtr<SecurityOrigin> create(const KURL&, SandboxFlags sandboxFlags = SandboxNone);

The argument name isn't needed here because the type speaks for itself.

Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

More information about the webkit-unassigned mailing list