Title: [144425] trunk/Source/WebCore
- Revision
- 144425
- Author
- [email protected]
- Date
- 2013-03-01 00:47:21 -0800 (Fri, 01 Mar 2013)
Log Message
XSSAuditor should use threadSafeMatch when relevant.
https://bugs.webkit.org/show_bug.cgi?id=111099
Reviewed by Adam Barth.
Given the work on breaking parsing out into a background thread, we
should compare QualifiedNames in a thread-safe manner. Rather than
casting the result of QualifiedName::localName to a String, we can
call out to threadSafeMatch to do the comparison.
This patch leaves one use of equalIgnoringNullity in
XSSAuditor::findAttributeWithName. That usage seems safe, since we're
creating a new string against which to compare.
* html/parser/XSSAuditor.cpp:
(WebCore::hasName):
Replace call to equalIgnoringNullity(Vector<UChar...>, String)
with threadSafeMatch(String, QualifiedName).
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (144424 => 144425)
--- trunk/Source/WebCore/ChangeLog 2013-03-01 08:23:09 UTC (rev 144424)
+++ trunk/Source/WebCore/ChangeLog 2013-03-01 08:47:21 UTC (rev 144425)
@@ -1,3 +1,24 @@
+2013-03-01 Mike West <[email protected]>
+
+ XSSAuditor should use threadSafeMatch when relevant.
+ https://bugs.webkit.org/show_bug.cgi?id=111099
+
+ Reviewed by Adam Barth.
+
+ Given the work on breaking parsing out into a background thread, we
+ should compare QualifiedNames in a thread-safe manner. Rather than
+ casting the result of QualifiedName::localName to a String, we can
+ call out to threadSafeMatch to do the comparison.
+
+ This patch leaves one use of equalIgnoringNullity in
+ XSSAuditor::findAttributeWithName. That usage seems safe, since we're
+ creating a new string against which to compare.
+
+ * html/parser/XSSAuditor.cpp:
+ (WebCore::hasName):
+ Replace call to equalIgnoringNullity(Vector<UChar...>, String)
+ with threadSafeMatch(String, QualifiedName).
+
2013-02-28 Keishi Hattori <[email protected]>
Add calendar table view for the new calendar picker
Modified: trunk/Source/WebCore/html/parser/XSSAuditor.cpp (144424 => 144425)
--- trunk/Source/WebCore/html/parser/XSSAuditor.cpp 2013-03-01 08:23:09 UTC (rev 144424)
+++ trunk/Source/WebCore/html/parser/XSSAuditor.cpp 2013-03-01 08:47:21 UTC (rev 144425)
@@ -115,7 +115,7 @@
static bool hasName(const HTMLToken& token, const QualifiedName& name)
{
- return equalIgnoringNullity(token.name(), static_cast<const String&>(name.localName()));
+ return threadSafeMatch(token.nameString(), name);
}
static bool findAttributeWithName(const HTMLToken& token, const QualifiedName& name, size_t& indexOfMatchingAttribute)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes