Title: [94821] trunk/Source/WebCore
Revision
94821
Author
[email protected]
Date
2011-09-08 16:48:58 -0700 (Thu, 08 Sep 2011)

Log Message

[chromium] KURL::copy doesn't produce something usable on another thread.
https://bugs.webkit.org/show_bug.cgi?id=67809

Reviewed by Adam Barth.

No new functionality exposed so no new test. This was caught by testing code: the thread
sanitizer run in Chromium (http://code.google.com/p/chromium/issues/detail?id=93708).

* platform/KURLGoogle.cpp:
(WebCore::KURLGooglePrivate::copyTo): Clear out the invalid String so that it will
not be used on another thread.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (94820 => 94821)


--- trunk/Source/WebCore/ChangeLog	2011-09-08 23:35:09 UTC (rev 94820)
+++ trunk/Source/WebCore/ChangeLog	2011-09-08 23:48:58 UTC (rev 94821)
@@ -1,3 +1,17 @@
+2011-09-08  David Levin  <[email protected]>
+
+        [chromium] KURL::copy doesn't produce something usable on another thread.
+        https://bugs.webkit.org/show_bug.cgi?id=67809
+
+        Reviewed by Adam Barth.
+
+        No new functionality exposed so no new test. This was caught by testing code: the thread
+        sanitizer run in Chromium (http://code.google.com/p/chromium/issues/detail?id=93708).
+
+        * platform/KURLGoogle.cpp:
+        (WebCore::KURLGooglePrivate::copyTo): Clear out the invalid String so that it will
+        not be used on another thread.
+
 2011-09-08  Alexey Proskuryakov  <[email protected]>
 
         REGRESSION (r66874): Missing RefPtr in ScriptController

Modified: trunk/Source/WebCore/platform/KURLGoogle.cpp (94820 => 94821)


--- trunk/Source/WebCore/platform/KURLGoogle.cpp	2011-09-08 23:35:09 UTC (rev 94820)
+++ trunk/Source/WebCore/platform/KURLGoogle.cpp	2011-09-08 23:48:58 UTC (rev 94821)
@@ -284,6 +284,7 @@
     dest->m_utf8 = CString(m_utf8.data(), m_utf8.length());
     dest->m_utf8IsASCII = m_utf8IsASCII;
     dest->m_stringIsValid = false;
+    dest->m_string = String(); // Clear the invalid string to avoid cross thread ref counting.
 }
 
 String KURLGooglePrivate::componentString(const url_parse::Component& comp) const
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to