Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Issue 2649513002: Add a pre-finalizer for XHR to cancel the loader (Closed)

Created:
3 years, 11 months ago by yhirano
Modified:
3 years, 11 months ago
CC:
chromium-reviews, blink-reviews, tyoshino+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add a pre-finalizer for XHR to cancel the loader In some cases hasPendingActivity doesn't work correctly, i.e., doesn't keep |this| alive. We need to cancel the loader in such cases, so this CL adds a pre-finalizer. BUG=667254 Review-Url: https://codereview.chromium.org/2649513002 Cr-Commit-Position: refs/heads/master@{#445018} Committed: https://chromium.googlesource.com/chromium/src/+/a05ab964ff708f4edcfc38f90b5f933f7a07478b

Patch Set 1 #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+14 lines, -0 lines) Patch
M third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.h View 2 chunks +7 lines, -0 lines 6 comments Download
M third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp View 1 chunk +7 lines, -0 lines 0 comments Download

Messages

Total messages: 25 (9 generated)
yhirano
kouhei@, is this what you meant? Is there a filed bug for the hasPendingActivity issue?
3 years, 11 months ago (2017-01-20 06:17:36 UTC) #4
tyoshino (SeeGerritForStatus)
lgtm I have some concern with that we're not implementing the logic we have in ...
3 years, 11 months ago (2017-01-20 06:29:54 UTC) #5
kouhei (in TOK)
lgtm for last resort solution yes, but I'd like to check w/ shiino-san
3 years, 11 months ago (2017-01-20 06:32:10 UTC) #6
kouhei (in TOK)
+shiinosan
3 years, 11 months ago (2017-01-20 06:32:42 UTC) #8
yhirano
+yukishiino@
3 years, 11 months ago (2017-01-20 06:32:58 UTC) #9
tyoshino (SeeGerritForStatus)
On 2017/01/20 06:29:54, tyoshino wrote: > lgtm > > I have some concern with that ...
3 years, 11 months ago (2017-01-20 06:34:31 UTC) #10
Yuki
LGTM. https://codereview.chromium.org/2649513002/diff/1/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.h File third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.h (right): https://codereview.chromium.org/2649513002/diff/1/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.h#newcode76 third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.h:76: // In some cases hasPendingActivity doesn't work correctly, ...
3 years, 11 months ago (2017-01-20 07:02:53 UTC) #11
yhirano
https://codereview.chromium.org/2649513002/diff/1/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.h File third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.h (right): https://codereview.chromium.org/2649513002/diff/1/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.h#newcode76 third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.h:76: // In some cases hasPendingActivity doesn't work correctly, i.e., ...
3 years, 11 months ago (2017-01-20 07:10:10 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2649513002/1
3 years, 11 months ago (2017-01-20 07:55:47 UTC) #15
commit-bot: I haz the power
Committed patchset #1 (id:1) as https://chromium.googlesource.com/chromium/src/+/a05ab964ff708f4edcfc38f90b5f933f7a07478b
3 years, 11 months ago (2017-01-20 08:47:29 UTC) #18
sof
(i'd appreciate being looped in on CLs in this general area.) https://codereview.chromium.org/2649513002/diff/1/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.h File third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.h (right): ...
3 years, 11 months ago (2017-01-20 09:17:23 UTC) #20
yhirano
https://codereview.chromium.org/2649513002/diff/1/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.h File third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.h (right): https://codereview.chromium.org/2649513002/diff/1/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.h#newcode80 third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.h:80: USING_PRE_FINALIZER(XMLHttpRequest, dispose); On 2017/01/20 09:17:23, sof wrote: > This ...
3 years, 11 months ago (2017-01-20 09:49:56 UTC) #21
yhirano
https://codereview.chromium.org/2649513002/diff/1/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.h File third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.h (right): https://codereview.chromium.org/2649513002/diff/1/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.h#newcode80 third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.h:80: USING_PRE_FINALIZER(XMLHttpRequest, dispose); On 2017/01/20 09:49:56, yhirano wrote: > On ...
3 years, 11 months ago (2017-01-20 09:54:08 UTC) #22
sof
https://codereview.chromium.org/2649513002/diff/1/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.h File third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.h (right): https://codereview.chromium.org/2649513002/diff/1/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.h#newcode80 third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.h:80: USING_PRE_FINALIZER(XMLHttpRequest, dispose); On 2017/01/20 09:54:08, yhirano wrote: > On ...
3 years, 11 months ago (2017-01-20 09:57:45 UTC) #23
haraken
On 2017/01/20 09:57:45, sof wrote: > https://codereview.chromium.org/2649513002/diff/1/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.h > File third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.h (right): > > https://codereview.chromium.org/2649513002/diff/1/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.h#newcode80 > ...
3 years, 11 months ago (2017-01-20 10:42:53 UTC) #24
sof
3 years, 11 months ago (2017-01-20 10:50:20 UTC) #25
Message was sent while issue was closed.
On 2017/01/20 10:42:53, haraken wrote:
> On 2017/01/20 09:57:45, sof wrote:
> >
>
https://codereview.chromium.org/2649513002/diff/1/third_party/WebKit/Source/c...
> > File third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.h (right):
> > 
> >
>
https://codereview.chromium.org/2649513002/diff/1/third_party/WebKit/Source/c...
> > third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.h:80:
> > USING_PRE_FINALIZER(XMLHttpRequest, dispose);
> > On 2017/01/20 09:54:08, yhirano wrote:
> > > On 2017/01/20 09:49:56, yhirano wrote:
> > > > On 2017/01/20 09:17:23, sof wrote:
> > > > > we can either stick with eager finalization or a prefinalizer, but
> > > > > not both. I'm fine with using a prefinalizer, as the number of live
XHRs
> > > > > wouldn't be excessively large.
> > > > Thanks, I will stop XHR from EAGERLY_FINALIZing next week.
> > > > 
> > > What happens if we specify both?
> > > 
> > >  1) Something very bad happens (e.g., crash, leak)
> > >  2) One of them is ignored
> > >  3) They're working but wasteful
> > > 
> > 
> > 3, it is confused and wasteful to do both. The destructor must run if
eagerly
> > finalized, so you get to promptly let go of some resources, like some of the
> > buffers and decoder objects that XHR has.
> 
> Do you think this is related to the leak of fetch-request-redirect.https.html?
> 
>
https://build.chromium.org/p/chromium.webkit/builders/WebKit%20Linux%20Trusty...

Don't think so, looks like https://codereview.chromium.org/2640983005

Powered by Google App Engine
This is Rietveld 408576698