Bug 131446 - [Win] Various DumpRenderTree Fixes
Summary: [Win] Various DumpRenderTree Fixes
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC All
: P2 Major
Assignee: Brent Fulgham
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-09 11:36 PDT by Brent Fulgham
Modified: 2014-04-09 13:22 PDT (History)
0 users

See Also:


Attachments
Patch (99.20 KB, patch)
2014-04-09 12:24 PDT, Brent Fulgham
no flags Details | Formatted Diff | Diff
Patch (98.86 KB, patch)
2014-04-09 13:11 PDT, Brent Fulgham
thorton: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.
Comment 1 Brent Fulgham 2014-04-09 12:24:12 PDT
Created attachment 228972 [details]
Patch
Comment 2 Brent Fulgham 2014-04-09 13:11:06 PDT
Created attachment 228976 [details]
Patch
Comment 3 Brent Fulgham 2014-04-09 13:22:10 PDT
Committed r167030: <http://trac.webkit.org/changeset/167030>