Title: [243609] trunk/Source/_javascript_Core
- Revision
- 243609
- Author
- [email protected]
- Date
- 2019-03-28 10:50:19 -0700 (Thu, 28 Mar 2019)
Log 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):
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (243608 => 243609)
--- trunk/Source/_javascript_Core/ChangeLog 2019-03-28 17:50:18 UTC (rev 243608)
+++ trunk/Source/_javascript_Core/ChangeLog 2019-03-28 17:50:19 UTC (rev 243609)
@@ -1,3 +1,17 @@
+2019-03-28 Tadeu Zagallo <[email protected]>
+
+ 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):
+
2019-03-28 Víctor Manuel Jáquez Leal <[email protected]>
Silence lot of warnings when compiling with clang
Modified: trunk/Source/_javascript_Core/parser/SourceCodeKey.h (243608 => 243609)
--- trunk/Source/_javascript_Core/parser/SourceCodeKey.h 2019-03-28 17:50:18 UTC (rev 243608)
+++ trunk/Source/_javascript_Core/parser/SourceCodeKey.h 2019-03-28 17:50:19 UTC (rev 243609)
@@ -110,6 +110,8 @@
// providers cache their strings to make this efficient.
StringView string() const { return m_sourceCode.view(); }
+ StringView host() const { return m_sourceCode.provider().url().host(); }
+
bool operator==(const SourceCodeKey& other) const
{
return m_hash == other.m_hash
@@ -117,6 +119,7 @@
&& m_flags == other.m_flags
&& m_functionConstructorParametersEndPosition == other.m_functionConstructorParametersEndPosition
&& m_name == other.m_name
+ && host() == other.host()
&& string() == other.string();
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes