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

Issue 442183003: FetchEvent should not forcibly reject an unresolved Promise when destructed (Closed)

Created:
6 years, 4 months ago by haraken
Modified:
6 years, 4 months ago
CC:
blink-reviews, michaeln, jsbell+serviceworker_chromium.org, kenjibaheux+watch_chromium.org, tzik, serviceworker-reviews, nhiroki, falken, kinuko+serviceworker, horo+watch_chromium.org, alecflett+watch_chromium.org
Project:
blink
Visibility:
Public.

Description

FetchEvent should not forcibly reject an unresolved Promise when destructed Currently an unresolved Promise on RespondWithObserver is forcibly rejected when the RespondWithObserver is destructed. This means that an unresolved Promise registered with fetchEvent.respondWith() is forcibly rejected when the fetchEvent is destructed. This behavior is not good because it makes GC observable. (For more details, see comment #2 and #4 in the CL discussion.) Given the above, this CL stops rejecting an unresolved Promise in RespondWithObserver's destructor. Also this CL removes a test that were testing the behavior. The removed test should hang after this change (because an unresolved Promise is never resolved nor rejected). BUG=400645 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=179695

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Total comments: 1

Patch Set 4 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+0 lines, -25 lines) Patch
M LayoutTests/http/tests/serviceworker/fetch-event.html View 1 2 1 chunk +0 lines, -18 lines 0 comments Download
M LayoutTests/http/tests/serviceworker/resources/fetch-event-test-worker.js View 1 2 2 chunks +0 lines, -5 lines 0 comments Download
M Source/modules/serviceworkers/RespondWithObserver.cpp View 1 2 3 1 chunk +0 lines, -2 lines 0 comments Download

Messages

Total messages: 17 (0 generated)
haraken
+serviceworker-reviews PTAL
6 years, 4 months ago (2014-08-06 05:22:28 UTC) #1
Mads Ager (chromium)
Does the spec say that you have to reject unresolved promises like this? Intuitively, I ...
6 years, 4 months ago (2014-08-06 06:57:50 UTC) #2
haraken
dominicc@, falken@: Do you have any idea on Mads' comment in #2?
6 years, 4 months ago (2014-08-06 07:06:57 UTC) #3
dominicc (has gone to gerrit)
On 2014/08/06 07:06:57, haraken wrote: > dominicc@, falken@: Do you have any idea on Mads' ...
6 years, 4 months ago (2014-08-06 07:29:31 UTC) #4
haraken
On 2014/08/06 07:29:31, dominicc wrote: > On 2014/08/06 07:06:57, haraken wrote: > > dominicc@, falken@: ...
6 years, 4 months ago (2014-08-06 07:57:26 UTC) #5
haraken
Also updated the CL description.
6 years, 4 months ago (2014-08-06 08:00:19 UTC) #6
haraken
dominicc: would you take a look at this?
6 years, 4 months ago (2014-08-07 02:28:43 UTC) #7
dominicc (has gone to gerrit)
This not LGTM, won't the assert fire if you call respondWith and never resolve the ...
6 years, 4 months ago (2014-08-07 04:40:18 UTC) #8
haraken
> I think we should change FetchEvent destructor to not reject the Promise it this ...
6 years, 4 months ago (2014-08-07 04:47:15 UTC) #9
dominicc (has gone to gerrit)
On 2014/08/07 04:47:15, haraken wrote: > > I think we should change FetchEvent destructor to ...
6 years, 4 months ago (2014-08-07 05:17:05 UTC) #10
dominicc (has gone to gerrit)
On 2014/08/07 05:17:05, dominicc wrote: > On 2014/08/07 04:47:15, haraken wrote: > > > I ...
6 years, 4 months ago (2014-08-07 05:23:08 UTC) #11
haraken
> ~RespondWithObserver should not assert that state != PENDING, you can see from > the ...
6 years, 4 months ago (2014-08-07 06:00:47 UTC) #12
dominicc (has gone to gerrit)
LGTM
6 years, 4 months ago (2014-08-07 07:16:50 UTC) #13
haraken
The CQ bit was checked by haraken@chromium.org
6 years, 4 months ago (2014-08-07 07:27:09 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/haraken@chromium.org/442183003/60001
6 years, 4 months ago (2014-08-07 07:28:44 UTC) #15
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: mac_blink_compile_dbg on tryserver.blink ...
6 years, 4 months ago (2014-08-07 08:59:27 UTC) #16
commit-bot: I haz the power
6 years, 4 months ago (2014-08-07 09:08:55 UTC) #17
Message was sent while issue was closed.
Change committed as 179695

Powered by Google App Engine
This is Rietveld 408576698