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

Issue 2251893002: Add destroyDecodedDataIfPossible to ScriptResource to stop ScriptStreaming. (Closed)

Created:
4 years, 4 months ago by tasak
Modified:
4 years, 4 months ago
Reviewers:
haraken, marja
CC:
chromium-reviews, tyoshino+watch_chromium.org, sof, eae+blinkwatch, blink-reviews-dom_chromium.org, dglazkov+blink, gavinp+loader_chromium.org, blink-reviews, loading-reviews+fetch_chromium.org, Nate Chapin, rwlbuis
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add destroyDecodedDataIfPossible to ScriptResource to stop ScriptStreaming. BUG=635419

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+16 lines, -0 lines) Patch
M third_party/WebKit/Source/core/dom/PendingScript.h View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/PendingScript.cpp View 1 chunk +6 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/ScriptResource.h View 2 chunks +2 lines, -0 lines 1 comment Download
M third_party/WebKit/Source/core/fetch/ScriptResource.cpp View 1 chunk +7 lines, -0 lines 1 comment Download

Messages

Total messages: 12 (6 generated)
tasak
Would you review this CL?
4 years, 4 months ago (2016-08-17 08:13:35 UTC) #7
haraken
LGTM on my side but I want to have marja@ confirm the change (i.e., if ...
4 years, 4 months ago (2016-08-17 08:29:19 UTC) #8
marja
lgtm % a comment https://codereview.chromium.org/2251893002/diff/1/third_party/WebKit/Source/core/fetch/ScriptResource.cpp File third_party/WebKit/Source/core/fetch/ScriptResource.cpp (right): https://codereview.chromium.org/2251893002/diff/1/third_party/WebKit/Source/core/fetch/ScriptResource.cpp#newcode74 third_party/WebKit/Source/core/fetch/ScriptResource.cpp:74: void ScriptResource::destroyDecodedDataIfPossible() ... and especially ...
4 years, 4 months ago (2016-08-17 08:37:40 UTC) #9
haraken
On 2016/08/17 08:37:40, marja wrote: > lgtm % a comment > > https://codereview.chromium.org/2251893002/diff/1/third_party/WebKit/Source/core/fetch/ScriptResource.cpp > File ...
4 years, 4 months ago (2016-08-17 08:44:43 UTC) #10
marja
How high / deep through the levels would you route the name "purgeMemory"? Would ScriptStreamer ...
4 years, 4 months ago (2016-08-17 08:46:44 UTC) #11
tasak
4 years, 4 months ago (2016-08-17 09:53:50 UTC) #12
Thank you, marja.

On 2016/08/17 08:46:44, marja wrote:
> How high / deep through the levels would you route the name "purgeMemory"?
Would
> ScriptStreamer have purgeMemory? Who'd call ScriptResource::purgeMemory?

I'm sorry.
I discussed with hiroshige@ and I found that I modified MemoryCache::prune to
force to invoke the prune (in this case,
call path is MemoryCache::prune => Resource::prune() =>
ScriptResource::destroyDecodedDataIfPossible())

However, the change of MemoryCache::prune is not allowable and there is no way
to invoke the notifyCancel and so on.

I will think about how to invoke this cancel method and will add unittests
(hiroshige@ requested).
So I will close this issue and will recreate another patch, which solves these
issues.

Powered by Google App Engine
This is Rietveld 408576698