Bug 181875

Summary: [Curl] CurlRequest must protect its client from disposal while it's on duty.
Product: WebKit Reporter: Basuke Suzuki <basuke>
Component: WebCore Misc.Assignee: Basuke Suzuki <basuke>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, basuke, commit-queue, don.olmstead, ews-watchlist, galpeter, rniwa, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 117300    
Attachments:
Description Flags
patch
achristensen: review-
use ref/deref none

Basuke Suzuki
Reported 2018-01-19 13:02:58 PST
Adding retain/release method to the client protocol and use them to protect the client from disposal.
Attachments
patch (7.30 KB, patch)
2018-01-19 13:23 PST, Basuke Suzuki
achristensen: review-
use ref/deref (7.23 KB, patch)
2018-01-23 13:08 PST, Basuke Suzuki
no flags
Basuke Suzuki
Comment 1 2018-01-19 13:23:29 PST
Alex Christensen
Comment 2 2018-01-19 14:05:22 PST
Comment on attachment 331779 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=331779&action=review > Source/WebCore/platform/network/curl/CurlRequestClient.h:39 > + virtual void retain() = 0; > + virtual void release() = 0; Can these be called ref and deref? Then we can just make RefPtr's instead of manually calling retain and release. We do something similar in several places, like IDBConnectionToServerDelegate, IDBConnectionToClientDelegate, CSSFontFace::Client, CSSRuleList, CSSStyleDeclaration, and ServiceWorkerJobClient
Basuke Suzuki
Comment 3 2018-01-19 15:59:53 PST
(In reply to Alex Christensen from comment #2) > Comment on attachment 331779 [details] > patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=331779&action=review > > > Source/WebCore/platform/network/curl/CurlRequestClient.h:39 > > + virtual void retain() = 0; > > + virtual void release() = 0; > > Can these be called ref and deref? Then we can just make RefPtr's instead > of manually calling retain and release. > We do something similar in several places, like > IDBConnectionToServerDelegate, IDBConnectionToClientDelegate, > CSSFontFace::Client, CSSRuleList, CSSStyleDeclaration, and > ServiceWorkerJobClient Okay, thanks. We'll take a look into those.
Basuke Suzuki
Comment 4 2018-01-23 13:08:01 PST
Created attachment 332065 [details] use ref/deref
WebKit Commit Bot
Comment 5 2018-01-23 14:30:12 PST
The commit-queue encountered the following flaky tests while processing attachment 332065 [details]: js/arity-mismatch-at-vmentry.html bug 182014 (authors: cdumez@apple.com and msaboff@apple.com) The commit-queue is continuing to process your patch.
WebKit Commit Bot
Comment 6 2018-01-23 14:30:44 PST
Comment on attachment 332065 [details] use ref/deref Clearing flags on attachment: 332065 Committed r227449: <https://trac.webkit.org/changeset/227449>
WebKit Commit Bot
Comment 7 2018-01-23 14:30:46 PST
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 8 2018-01-23 14:31:54 PST
Note You need to log in before you can comment on or make changes to this bug.