API test WTF.StaticStringImpl crashing in TestWebKitAPI::WTF_StaticStringImpl_Test...
authormark.lam@apple.com <mark.lam@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 5 May 2017 03:24:55 +0000 (03:24 +0000)
committermark.lam@apple.com <mark.lam@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 5 May 2017 03:24:55 +0000 (03:24 +0000)
https://bugs.webkit.org/show_bug.cgi?id=171702

Reviewed by Filip Pizlo.

The test was supposed to use the MAKE_STATIC_STRING_IMPL macro.  I had previously
changed it to instantiate an automatic StaticStringImpl (i.e. stack allocated) to
confirm that the test will detect a regression.  Unfortunately, I forgot to
change it back to using MAKE_STATIC_STRING_IMPL before I landed the test.
This patch fixes that.

* TestWebKitAPI/Tests/WTF/StringImpl.cpp:
(TestWebKitAPI::neverDestroyedString):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@216231 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WTF/StringImpl.cpp

index ca71e7a..f448de4 100644 (file)
@@ -1,3 +1,19 @@
+2017-05-04  Mark Lam  <mark.lam@apple.com>
+
+        API test WTF.StaticStringImpl crashing in TestWebKitAPI::WTF_StaticStringImpl_Test::TestBody() + 3188
+        https://bugs.webkit.org/show_bug.cgi?id=171702
+
+        Reviewed by Filip Pizlo.
+
+        The test was supposed to use the MAKE_STATIC_STRING_IMPL macro.  I had previously
+        changed it to instantiate an automatic StaticStringImpl (i.e. stack allocated) to
+        confirm that the test will detect a regression.  Unfortunately, I forgot to
+        change it back to using MAKE_STATIC_STRING_IMPL before I landed the test.
+        This patch fixes that.
+
+        * TestWebKitAPI/Tests/WTF/StringImpl.cpp:
+        (TestWebKitAPI::neverDestroyedString):
+
 2017-05-04  Ryan Haddad  <ryanhaddad@apple.com>
 
         Disable failing API test WebKit2.ResizeWithHiddenContentDoesNotHang.
index 9652594..b92b85d 100644 (file)
@@ -629,7 +629,7 @@ TEST(WTF, StringImplEmpty)
 
 static const String& neverDestroyedString()
 {
-    static NeverDestroyed<String> str(StaticStringImpl("NeverDestroyedString"));
+    static NeverDestroyed<String> str(MAKE_STATIC_STRING_IMPL("NeverDestroyedString"));
     return str;
 };