|Summary:||[Win] Various DumpRenderTree Fixes|
|Product:||WebKit||Reporter:||Brent Fulgham <bfulgham>|
|Component:||Tools / Tests||Assignee:||Brent Fulgham <bfulgham>|
|Version:||528+ (Nightly build)|
Description Brent Fulgham 2014-04-09 11:36:52 PDT
While investigating some flakiness in the Windows test runs, I found the following issues that needed to be addressed: 1. The logic that decides when to output raw text (rather than a RenderTree) does not match what happens on Mac. This caused tests to output render trees in some cases when raw text output was expected, resulting in test failures. 2. BSTR types were not consistently cleaned up, resulting in small memory leaks. Instead, we should be using the Visual Studio-supplied _bstr_t type, which encapsulates the data type and ensure proper creation/destruction. 3. BSTR types were being copied into new wstring values for the sole purpose of output to printf. This is not necessary, and should be done by an appropriate cast. 4. Hand-rolled routines to convert BSTR->JSStringRef or JSStringRef->BSTR should instead use the JS library-provided JSStringCreateWithBSTR or JSStringCopyBSTR, respectively. This patch corrects these issues.