Bug 143450 - WebKit1.SetAndUpdateCacheModelPreferencesChangeMix fails on some machines
Summary: WebKit1.SetAndUpdateCacheModelPreferencesChangeMix fails on some machines
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alexey Proskuryakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-06 12:05 PDT by Alexey Proskuryakov
Modified: 2015-04-06 12:59 PDT (History)
4 users (show)

See Also:


Attachments
proposed fix (2.95 KB, patch)
2015-04-06 12:07 PDT, Alexey Proskuryakov
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Proskuryakov 2015-04-06 12:05:08 PDT
The last subtest in WebKit1.SetAndUpdateCacheModelPreferencesChangeMix relies on the WebView to be deallocated/closed by webView.clear(). But this is not necessarily going to happen, because an autorelease pool can keep the view object alive until later.

    webView.clear();
    EXPECT_EQ((int)WebCacheModelDocumentViewer, (int)[WebView _cacheModel]); // <-- Only works when the above clear() drops the last reference.

Two ways to fix this:

1. Drain an autorelease pool before the check.

2. Call -close on the view explicitly.

I like the latter more, as it's the -close that we are actually after.
Comment 1 Alexey Proskuryakov 2015-04-06 12:07:39 PDT
Created attachment 250219 [details]
proposed fix
Comment 2 WebKit Commit Bot 2015-04-06 12:58:58 PDT
Comment on attachment 250219 [details]
proposed fix

Clearing flags on attachment: 250219

Committed r182434: <http://trac.webkit.org/changeset/182434>
Comment 3 WebKit Commit Bot 2015-04-06 12:59:02 PDT
All reviewed patches have been landed.  Closing bug.