Changeset 144549 in webkit
- Timestamp:
- Mar 2, 2013 5:45:58 PM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r144547 r144549 1 2013-03-02 Adam Barth <abarth@webkit.org> 2 3 XSSAuditor has a subtle race condition when used with the threaded HTML parser 4 https://bugs.webkit.org/show_bug.cgi?id=111253 5 6 Reviewed by Eric Seidel. 7 8 We were refing and derefing a StringImpl for a main-thread 9 AtomicString. Using QualifiedNames on the background thread is very 10 fragile and we should figure out a more robust solution. 11 12 * html/parser/XSSAuditor.cpp: 13 (WebCore::findAttributeWithName): 14 1 15 2013-03-02 Benjamin Poulain <bpoulain@apple.com> 2 16 -
trunk/Source/WebCore/html/parser/XSSAuditor.cpp
r144544 r144549 128 128 static bool findAttributeWithName(const HTMLToken& token, const QualifiedName& name, size_t& indexOfMatchingAttribute) 129 129 { 130 String attrName = name.localName().string(); 131 132 if (name.namespaceURI() == XLinkNames::xlinkNamespaceURI) 133 attrName = "xlink:" + attrName; 130 // Notice that we're careful not to ref the StringImpl here because we might be on a background thread. 131 const String& attrName = name.namespaceURI() == XLinkNames::xlinkNamespaceURI ? "xlink:" + name.localName().string() : name.localName().string(); 134 132 135 133 for (size_t i = 0; i < token.attributes().size(); ++i) {
Note: See TracChangeset
for help on using the changeset viewer.