Partially revert http://trac.webkit.org/r200504
authorap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 6 May 2016 06:07:25 +0000 (06:07 +0000)
committerap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 6 May 2016 06:07:25 +0000 (06:07 +0000)
Improve HTTP test names in WebKitTestRunner's crash report information
https://bugs.webkit.org/show_bug.cgi?id=157389

* WebKitTestRunner/cocoa/CrashReporterInfo.mm: Turns out that we can't have URLs
in crash reporter information.

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

Tools/ChangeLog
Tools/WebKitTestRunner/cocoa/CrashReporterInfo.mm

index c1dae08..ea9b276 100644 (file)
@@ -1,5 +1,14 @@
 2016-05-05  Alexey Proskuryakov  <ap@apple.com>
 
 2016-05-05  Alexey Proskuryakov  <ap@apple.com>
 
+        Partially revert http://trac.webkit.org/r200504
+        Improve HTTP test names in WebKitTestRunner's crash report information
+        https://bugs.webkit.org/show_bug.cgi?id=157389
+
+        * WebKitTestRunner/cocoa/CrashReporterInfo.mm: Turns out that we can't have URLs
+        in crash reporter information.
+
+2016-05-05  Alexey Proskuryakov  <ap@apple.com>
+
         Improve HTTP test names in WebKitTestRunner's crash report information
         https://bugs.webkit.org/show_bug.cgi?id=157389
 
         Improve HTTP test names in WebKitTestRunner's crash report information
         https://bugs.webkit.org/show_bug.cgi?id=157389
 
index 48fe6ee..c640323 100644 (file)
@@ -33,7 +33,7 @@
 
 namespace WTR {
 
 
 namespace WTR {
 
-static String testDescription(WKURLRef url)
+static String testPathFromURL(WKURLRef url)
 {
     RetainPtr<CFURLRef> cfURL = adoptCF(WKURLCopyCFURL(kCFAllocatorDefault, url));
     if (!cfURL)
 {
     RetainPtr<CFURLRef> cfURL = adoptCF(WKURLCopyCFURL(kCFAllocatorDefault, url));
     if (!cfURL)
@@ -59,18 +59,18 @@ static String testDescription(WKURLRef url)
 
     RetainPtr<CFStringRef> hostCFString = adoptCF(CFURLCopyHostName(cfURL.get()));
     String hostString(hostCFString.get());
 
     RetainPtr<CFStringRef> hostCFString = adoptCF(CFURLCopyHostName(cfURL.get()));
     String hostString(hostCFString.get());
-    if (hostString != "127.0.0.1")
-        return String();
+    if (hostString == "127.0.0.1")
+        return pathString;
 
 
-    return CFURLGetString(cfURL.get());
+    return String();
 }
 
 void setCrashReportApplicationSpecificInformationToURL(WKURLRef url)
 {
 }
 
 void setCrashReportApplicationSpecificInformationToURL(WKURLRef url)
 {
-    String description = testDescription(url);
-    if (!description.isNull()) {
+    String testPath = testPathFromURL(url);
+    if (!testPath.isNull()) {
         String message("CRASHING TEST: ");
         String message("CRASHING TEST: ");
-        message = message + description;
+        message = message + testPath;
         WKSetCrashReportApplicationSpecificInformation(message.createCFString().get());
     }
 }
         WKSetCrashReportApplicationSpecificInformation(message.createCFString().get());
     }
 }