Bug 159691

Summary: [WK2][NetworkSession] Fix unsafe RunLoop::dispatch() in NetworkLoad constructor
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: WebKit2Assignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, beidson, cgarcia, commit-queue, ddkilzer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=159526
Attachments:
Description Flags
Patch none

Chris Dumez
Reported 2016-07-12 15:02:03 PDT
Fix unsafe RunLoop::dispatch() in NetworkLoad constructor. It captures |this| but there is no guarantee the NetworkLoad will still be alive by the time the lambda gets executed.
Attachments
Patch (10.16 KB, patch)
2016-07-12 15:06 PDT, Chris Dumez
no flags
Chris Dumez
Comment 1 2016-07-12 15:06:17 PDT
Chris Dumez
Comment 2 2016-07-12 15:07:10 PDT
Let me know if after seeing the code you think we should use a factory function on NetworkLoad and PendingDownload instead. I hesitated between the two approaches.
Chris Dumez
Comment 3 2016-07-12 15:11:27 PDT
Chris Dumez
Comment 4 2016-07-12 15:44:06 PDT
Comment on attachment 283455 [details] Patch Clearing flags on attachment: 283455 Committed r203133: <http://trac.webkit.org/changeset/203133>
Chris Dumez
Comment 5 2016-07-12 15:44:11 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.