Title: [176885] trunk/Tools
Revision
176885
Author
[email protected]
Date
2014-12-05 16:16:24 -0800 (Fri, 05 Dec 2014)

Log Message

REGRESSION (r176677): All tests crash on Windows
https://bugs.webkit.org/show_bug.cgi?id=139321

Reviewed by Alexey Proskuryakov.

* DumpRenderTree/win/DumpRenderTree.cpp:
(runTest):
Don't call CFRelease on the url while we have an outstanding pointer to its string,
and use the right number of bytes when allocating the testURL buffer.

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (176884 => 176885)


--- trunk/Tools/ChangeLog	2014-12-06 00:10:14 UTC (rev 176884)
+++ trunk/Tools/ChangeLog	2014-12-06 00:16:24 UTC (rev 176885)
@@ -1,3 +1,15 @@
+2014-12-05  Anders Carlsson  <[email protected]>
+
+        REGRESSION (r176677): All tests crash on Windows
+        https://bugs.webkit.org/show_bug.cgi?id=139321
+
+        Reviewed by Alexey Proskuryakov.
+
+        * DumpRenderTree/win/DumpRenderTree.cpp:
+        (runTest):
+        Don't call CFRelease on the url while we have an outstanding pointer to its string,
+        and use the right number of bytes when allocating the testURL buffer.
+
 2014-12-05  Daniel Bates  <[email protected]>
 
         [iOS] DumpRenderTree produces many reference test mismatches

Modified: trunk/Tools/DumpRenderTree/win/DumpRenderTree.cpp (176884 => 176885)


--- trunk/Tools/DumpRenderTree/win/DumpRenderTree.cpp	2014-12-06 00:10:14 UTC (rev 176884)
+++ trunk/Tools/DumpRenderTree/win/DumpRenderTree.cpp	2014-12-06 00:16:24 UTC (rev 176885)
@@ -993,8 +993,6 @@
 
     str = CFURLGetString(url);
 
-    CFRelease(url);
-
     CFIndex length = CFStringGetLength(str);
     UniChar* buffer = new UniChar[length + 1];
 
@@ -1005,10 +1003,12 @@
     ASSERT(urlBStr.length() == length);
     delete[] buffer;
 
-    CFIndex maximumURLLengthAsUTF8 = CFStringGetMaximumSizeForEncoding(length, kCFStringEncodingUTF8);
-    char* testURL = new char[];
+    CFIndex maximumURLLengthAsUTF8 = CFStringGetMaximumSizeForEncoding(length, kCFStringEncodingUTF8) + 1;
+    char* testURL = new char[maximumURLLengthAsUTF8];
     CFStringGetCString(str, testURL, maximumURLLengthAsUTF8, kCFStringEncodingUTF8);
 
+    CFRelease(url);
+
     ::gTestRunner = TestRunner::create(testURL, command.expectedPixelHash);
     topLoadingFrame = 0;
     done = false;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to