Bug 159962

Summary: PostResolutionCallbackDisabler can resume pending requests while a ResourceLoadSuspender is alive
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: Layout and RenderingAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, ddkilzer, esprehn+autocc, japhet, kangil.han, kling, koivisto, simon.fraser, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Chris Dumez
Reported 2016-07-19 19:50:34 PDT
PostResolutionCallbackDisabler can resume pending requests while a ResourceLoadSuspender is alive. We have both PostResolutionCallbackDisabler and ResourceLoadSuspender that call LoaderStrategy::suspendPendingRequests() / LoaderStrategy::resumePendingRequests(). However, PostResolutionCallbackDisabler and ResourceLoadSuspender are not aware of each other. It is therefore possible for a PostResolutionCallbackDisabler object to get destroyed and for LoaderStrategy::resumePendingRequests() to be called while a ResourceLoadSuspender object is alive. This leads to hard to investigate crashes where we end up re-entering WebKit and killing the style resolver. My proposal is to drop ResourceLoadSuspender and use PostResolutionCallbackDisabler instead. There is only one user of ResourceLoadSuspender and PostResolutionCallbackDisabler is better because it manages a resolutionNestingDepth counter internally to make sure it only calls LoaderStrategy::resumePendingRequests() once all PostResolutionCallbackDisabler instances are destroyed.
Attachments
Patch (4.11 KB, patch)
2016-07-19 19:54 PDT, Chris Dumez
no flags
Chris Dumez
Comment 1 2016-07-19 19:50:57 PDT
Chris Dumez
Comment 2 2016-07-19 19:54:40 PDT
David Kilzer (:ddkilzer)
Comment 3 2016-07-20 05:42:23 PDT
Comment on attachment 284079 [details] Patch r=me
WebKit Commit Bot
Comment 4 2016-07-20 06:03:26 PDT
Comment on attachment 284079 [details] Patch Clearing flags on attachment: 284079 Committed r203450: <http://trac.webkit.org/changeset/203450>
WebKit Commit Bot
Comment 5 2016-07-20 06:03:31 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.