Bug 173837

Summary: [TestWebKitAPI] Fix false-positive bad release warnings found by clang static analyzer
Product: WebKit Reporter: David Kilzer (:ddkilzer) <ddkilzer>
Component: Tools / TestsAssignee: David Kilzer (:ddkilzer) <ddkilzer>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, commit-queue, darin, dino, ggaren, lforschler, thorton
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch v1 none

Description David Kilzer (:ddkilzer) 2017-06-26 09:43:33 PDT
The following tests use a retain/release pattern that the clang static analyzer can't grok, which leads to a false-positive "bad release" warning:

TestWebKitAPI/Tests/mac/FullscreenZoomInitialFrame.mm
TestWebKitAPI/Tests/mac/PageVisibilityStateWithWindowChanges.mm

It's better to use a common idiom for storing the delegate object anyway.
Comment 1 David Kilzer (:ddkilzer) 2017-06-26 09:45:58 PDT
Created attachment 313846 [details]
Patch v1
Comment 2 Geoffrey Garen 2017-06-26 10:59:33 PDT
Comment on attachment 313846 [details]
Patch v1

r=me
Comment 3 WebKit Commit Bot 2017-06-26 11:02:42 PDT
Comment on attachment 313846 [details]
Patch v1

Clearing flags on attachment: 313846

Committed r218815: <http://trac.webkit.org/changeset/218815>
Comment 4 WebKit Commit Bot 2017-06-26 11:02:44 PDT
All reviewed patches have been landed.  Closing bug.