Title: [127233] trunk/Source/WTF
Revision
127233
Author
[email protected]
Date
2012-08-30 22:54:05 -0700 (Thu, 30 Aug 2012)

Log Message

AtomicString(ASCIILiteral) should not compile
https://bugs.webkit.org/show_bug.cgi?id=95413

Patch by Benjamin Poulain <[email protected]> on 2012-08-30
Reviewed by Adam Barth.

* wtf/text/AtomicString.h:
(AtomicString): Declare the constructor from ASCIILiteral private to ensure it is
not used by accident.

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (127232 => 127233)


--- trunk/Source/WTF/ChangeLog	2012-08-31 04:53:01 UTC (rev 127232)
+++ trunk/Source/WTF/ChangeLog	2012-08-31 05:54:05 UTC (rev 127233)
@@ -1,5 +1,16 @@
 2012-08-30  Benjamin Poulain  <[email protected]>
 
+        AtomicString(ASCIILiteral) should not compile
+        https://bugs.webkit.org/show_bug.cgi?id=95413
+
+        Reviewed by Adam Barth.
+
+        * wtf/text/AtomicString.h:
+        (AtomicString): Declare the constructor from ASCIILiteral private to ensure it is
+        not used by accident.
+
+2012-08-30  Benjamin Poulain  <[email protected]>
+
         Ambiguous operator[]  after r127191 on some compiler
         https://bugs.webkit.org/show_bug.cgi?id=95509
 

Modified: trunk/Source/WTF/wtf/text/AtomicString.h (127232 => 127233)


--- trunk/Source/WTF/wtf/text/AtomicString.h	2012-08-31 04:53:01 UTC (rev 127232)
+++ trunk/Source/WTF/wtf/text/AtomicString.h	2012-08-31 05:54:05 UTC (rev 127233)
@@ -155,6 +155,9 @@
     void show() const;
 #endif
 private:
+    // The explicit constructors with AtomicString::ConstructFromLiteral must be used for literals.
+    AtomicString(ASCIILiteral);
+
     String m_string;
     
     WTF_EXPORT_STRING_API static PassRefPtr<StringImpl> add(const LChar*);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to