Title: [145020] trunk/Source/WTF
Revision
145020
Author
[email protected]
Date
2013-03-06 18:22:36 -0800 (Wed, 06 Mar 2013)

Log Message

AtomicStringImpls are not safe to send between threads
https://bugs.webkit.org/show_bug.cgi?id=111652

Reviewed by Benjamin Poulain.

We don't have this problem yet, but it's good to be safe.

* wtf/text/WTFString.cpp:
(WTF::String::isSafeToSendToAnotherThread):

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (145019 => 145020)


--- trunk/Source/WTF/ChangeLog	2013-03-07 02:16:20 UTC (rev 145019)
+++ trunk/Source/WTF/ChangeLog	2013-03-07 02:22:36 UTC (rev 145020)
@@ -1,3 +1,15 @@
+2013-03-06  Eric Seidel  <[email protected]>
+
+        AtomicStringImpls are not safe to send between threads
+        https://bugs.webkit.org/show_bug.cgi?id=111652
+
+        Reviewed by Benjamin Poulain.
+
+        We don't have this problem yet, but it's good to be safe.
+
+        * wtf/text/WTFString.cpp:
+        (WTF::String::isSafeToSendToAnotherThread):
+
 2013-03-06  Oliver Hunt  <[email protected]>
 
         Don't give PageAllocationAligned the option to allocate executable memory

Modified: trunk/Source/WTF/wtf/text/WTFString.cpp (145019 => 145020)


--- trunk/Source/WTF/wtf/text/WTFString.cpp	2013-03-07 02:16:20 UTC (rev 145019)
+++ trunk/Source/WTF/wtf/text/WTFString.cpp	2013-03-07 02:22:36 UTC (rev 145020)
@@ -665,6 +665,10 @@
 {
     if (!impl())
         return true;
+    // AtomicStrings are not safe to send between threads as ~StringImpl()
+    // will try to remove them from the wrong AtomicStringTable.
+    if (impl()->isAtomic())
+        return false;
     if (impl()->hasOneRef())
         return true;
     if (isEmpty())
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to