⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 243609 in webkit


Ignore:
Timestamp:
Mar 28, 2019, 10:50:19 AM (7 years ago)
Author:
Tadeu Zagallo
Message:

In-memory code cache should not share bytecode across domains
https://bugs.webkit.org/show_bug.cgi?id=196321

Reviewed by Geoffrey Garen.

Use the SourceProvider's URL to make sure that the hosts match for the
two SourceCodeKeys in operator==.

  • parser/SourceCodeKey.h:

(JSC::SourceCodeKey::host const):
(JSC::SourceCodeKey::operator== const):

Location:
trunk/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r243603 r243609  
     12019-03-28  Tadeu Zagallo  <tzagallo@apple.com>
     2
     3        In-memory code cache should not share bytecode across domains
     4        https://bugs.webkit.org/show_bug.cgi?id=196321
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        Use the SourceProvider's URL to make sure that the hosts match for the
     9        two SourceCodeKeys in operator==.
     10
     11        * parser/SourceCodeKey.h:
     12        (JSC::SourceCodeKey::host const):
     13        (JSC::SourceCodeKey::operator== const):
     14
    1152019-03-28  Víctor Manuel Jáquez Leal  <vjaquez@igalia.com>
    216
  • trunk/Source/JavaScriptCore/parser/SourceCodeKey.h

    r240511 r243609  
    111111    StringView string() const { return m_sourceCode.view(); }
    112112
     113    StringView host() const { return m_sourceCode.provider().url().host(); }
     114
    113115    bool operator==(const SourceCodeKey& other) const
    114116    {
     
    118120            && m_functionConstructorParametersEndPosition == other.m_functionConstructorParametersEndPosition
    119121            && m_name == other.m_name
     122            && host() == other.host()
    120123            && string() == other.string();
    121124    }
Note: See TracChangeset for help on using the changeset viewer.