Title: [157931] trunk/Source/WTF
Revision
157931
Author
[email protected]
Date
2013-10-24 09:09:48 -0700 (Thu, 24 Oct 2013)

Log Message

Remove PCRE workaround.
https://bugs.webkit.org/show_bug.cgi?id=123265

Patch by Peter Molnar <[email protected]> on 2013-10-24
Reviewed by Darin Adler.

* wtf/text/StringStatics.cpp:
(WTF::StringImpl::empty):

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (157930 => 157931)


--- trunk/Source/WTF/ChangeLog	2013-10-24 16:06:50 UTC (rev 157930)
+++ trunk/Source/WTF/ChangeLog	2013-10-24 16:09:48 UTC (rev 157931)
@@ -1,5 +1,15 @@
 2013-10-24  Peter Molnar  <[email protected]>
 
+        Remove PCRE workaround.
+        https://bugs.webkit.org/show_bug.cgi?id=123265
+
+        Reviewed by Darin Adler.
+
+        * wtf/text/StringStatics.cpp:
+        (WTF::StringImpl::empty):
+
+2013-10-24  Peter Molnar  <[email protected]>
+
         Remove Clang workaround.
         https://bugs.webkit.org/show_bug.cgi?id=123262
 

Modified: trunk/Source/WTF/wtf/text/StringStatics.cpp (157930 => 157931)


--- trunk/Source/WTF/wtf/text/StringStatics.cpp	2013-10-24 16:06:50 UTC (rev 157930)
+++ trunk/Source/WTF/wtf/text/StringStatics.cpp	2013-10-24 16:09:48 UTC (rev 157931)
@@ -43,15 +43,7 @@
 
 StringImpl* StringImpl::empty()
 {
-    // FIXME: This works around a bug in our port of PCRE, that a regular _expression_
-    // run on the empty string may still perform a read from the first element, and
-    // as such we need this to be a valid pointer. No code should ever be reading
-    // from a zero length string, so this should be able to be a non-null pointer
-    // into the zero-page.
-    // Replace this with 'reinterpret_cast<UChar*>(static_cast<intptr_t>(1))' once
-    // PCRE goes away.
-    static LChar emptyLCharData = 0;
-    DEFINE_STATIC_LOCAL(StringImpl, emptyString, (&emptyLCharData, 0, ConstructStaticString));
+    DEFINE_STATIC_LOCAL(StringImpl, emptyString, (reinterpret_cast<UChar*>(static_cast<intptr_t>(1)), 0, ConstructStaticString));
     WTF_ANNOTATE_BENIGN_RACE(&emptyString, "Benign race on StringImpl::emptyString reference counter");
     return &emptyString;
 }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to