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

Issue 2922863002: Keep the wrapper of FetchEvent alive while waiting for the preload response. (Closed)

Created:
3 years, 6 months ago by horo
Modified:
3 years, 6 months ago
Reviewers:
haraken, yhirano
CC:
chromium-reviews, michaeln, jsbell+serviceworker_chromium.org, kenjibaheux+watch_chromium.org, shimazu+serviceworker_chromium.org, serviceworker-reviews, nhiroki, kinuko+serviceworker, blink-reviews, horo+watch_chromium.org, falken+watch_chromium.org, tzik
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Keep the wrapper of FetchEvent alive while waiting for the preload response. This CL uses ActiveScriptWrappable and implements HasPendingActivity() to keep the wrapper of FetchEvent alive while waiting for the preload response. FetchEvents are already kept alive by ServiceWorkerGlobalScopeProxy's |pending_preload_fetch_events_| until the preload response. But the resolver function is not called in the current implementation if GC happens. (https://crbug.com/728013#c28) That is because if the wrapper of FetchEvent are GCed, ScriptPromiseProperty can't call the resolver. BUG=728013 Review-Url: https://codereview.chromium.org/2922863002 Cr-Commit-Position: refs/heads/master@{#476977} Committed: https://chromium.googlesource.com/chromium/src/+/7f1ac9b18fed816431798435d68d8ee90668d392

Patch Set 1 #

Patch Set 2 : use ContextClient and add comment #

Total comments: 2

Patch Set 3 : incorporated yhirano's comment #

Messages

Total messages: 21 (14 generated)
horo
yhirano@ Could you please review this?
3 years, 6 months ago (2017-06-04 06:06:24 UTC) #5
yhirano
On 2017/06/04 06:06:24, horo wrote: > yhirano@ > Could you please review this? Why does ...
3 years, 6 months ago (2017-06-05 01:58:15 UTC) #12
haraken
On 2017/06/05 01:58:15, yhirano wrote: > On 2017/06/04 06:06:24, horo wrote: > > yhirano@ > ...
3 years, 6 months ago (2017-06-05 02:02:53 UTC) #13
yhirano
lgtm https://codereview.chromium.org/2922863002/diff/20001/third_party/WebKit/Source/modules/serviceworkers/FetchEvent.h File third_party/WebKit/Source/modules/serviceworkers/FetchEvent.h (right): https://codereview.chromium.org/2922863002/diff/20001/third_party/WebKit/Source/modules/serviceworkers/FetchEvent.h#newcode99 third_party/WebKit/Source/modules/serviceworkers/FetchEvent.h:99: bool waiting_for_preload_response_; You can rely on preload_response_propty_->GetState() instead ...
3 years, 6 months ago (2017-06-05 02:10:13 UTC) #14
horo
Thank you. https://codereview.chromium.org/2922863002/diff/20001/third_party/WebKit/Source/modules/serviceworkers/FetchEvent.h File third_party/WebKit/Source/modules/serviceworkers/FetchEvent.h (right): https://codereview.chromium.org/2922863002/diff/20001/third_party/WebKit/Source/modules/serviceworkers/FetchEvent.h#newcode99 third_party/WebKit/Source/modules/serviceworkers/FetchEvent.h:99: bool waiting_for_preload_response_; On 2017/06/05 02:10:13, yhirano wrote: ...
3 years, 6 months ago (2017-06-05 11:11:51 UTC) #15
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/2922863002/40001
3 years, 6 months ago (2017-06-05 11:12:16 UTC) #18
commit-bot: I haz the power
3 years, 6 months ago (2017-06-05 13:33:59 UTC) #21
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://chromium.googlesource.com/chromium/src/+/7f1ac9b18fed816431798435d68d...

Powered by Google App Engine
This is Rietveld 408576698