Title: [158299] trunk/Source/WTF
Revision
158299
Author
[email protected]
Date
2013-10-30 12:03:45 -0700 (Wed, 30 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-30
Reviewed by Brent Fulgham.

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

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (158298 => 158299)


--- trunk/Source/WTF/ChangeLog	2013-10-30 19:02:36 UTC (rev 158298)
+++ trunk/Source/WTF/ChangeLog	2013-10-30 19:03:45 UTC (rev 158299)
@@ -1,3 +1,13 @@
+2013-10-30  Peter Molnar  <[email protected]>
+
+        Remove PCRE workaround.
+        https://bugs.webkit.org/show_bug.cgi?id=123265
+
+        Reviewed by Brent Fulgham.
+
+        * wtf/text/StringStatics.cpp:
+        (WTF::StringImpl::empty):
+
 2013-10-30  [email protected]  <[email protected]>
 
         [Win] Compile errors when enabling DFG JIT.

Modified: trunk/Source/WTF/wtf/text/StringStatics.cpp (158298 => 158299)


--- trunk/Source/WTF/wtf/text/StringStatics.cpp	2013-10-30 19:02:36 UTC (rev 158298)
+++ trunk/Source/WTF/wtf/text/StringStatics.cpp	2013-10-30 19:03:45 UTC (rev 158299)
@@ -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>(8)), 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