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

Issue 2006803006: [Fetch API] Do not call v8 Extra script when the worker is terminating (Closed)

Created:
4 years, 7 months ago by yhirano
Modified:
4 years, 7 months ago
CC:
chromium-reviews, blink-reviews, blink-reviews-bindings_chromium.org, nhiroki
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Fetch API] Do not call v8 Extra script when the worker is terminating ReadableStreamOperations assumes v8 Extra scripts cannot return an empty handle but that assumption breaks when the worker is terminating. This CL adds some early returns to avoid such issues. This change is a workaround and should be reverted once the graceful shutdown mechanism is introduced. BUG=614272 Committed: https://crrev.com/bef901ae9100f30e3ee2fb185c4197a2de55e4c1 Cr-Commit-Position: refs/heads/master@{#396131}

Patch Set 1 : #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+191 lines, -27 lines) Patch
M third_party/WebKit/Source/core/streams/ReadableStreamController.h View 1 2 3 7 chunks +40 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/core/streams/ReadableStreamOperations.cpp View 1 2 2 chunks +95 lines, -16 lines 0 comments Download
M third_party/WebKit/Source/modules/fetch/BodyStreamBuffer.cpp View 1 5 chunks +34 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/modules/fetch/ReadableStreamDataConsumerHandle.cpp View 1 3 chunks +22 lines, -1 line 0 comments Download

Messages

Total messages: 27 (10 generated)
yhirano
4 years, 7 months ago (2016-05-25 14:51:06 UTC) #6
tyoshino (SeeGerritForStatus)
lgtm Description: some early returns -> early returns at some places or adds some early ...
4 years, 7 months ago (2016-05-26 06:04:52 UTC) #7
yhirano
thank you!
4 years, 7 months ago (2016-05-26 06:06:13 UTC) #9
yhirano
> Description: > some early returns -> early returns at some places > or > ...
4 years, 7 months ago (2016-05-26 06:06:35 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2006803006/110005 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2006803006/110005
4 years, 7 months ago (2016-05-26 06:06:55 UTC) #12
commit-bot: I haz the power
Committed patchset #4 (id:110005)
4 years, 7 months ago (2016-05-26 06:10:26 UTC) #14
commit-bot: I haz the power
Patchset 4 (id:??) landed as https://crrev.com/bef901ae9100f30e3ee2fb185c4197a2de55e4c1 Cr-Commit-Position: refs/heads/master@{#396131}
4 years, 7 months ago (2016-05-26 06:12:04 UTC) #16
haraken
Why do you need to check isExecutionContextTerminating? If the worker is terminating, the V8 API ...
4 years, 7 months ago (2016-05-26 08:08:23 UTC) #17
yhirano1
On 2016/05/26 08:08:23, haraken wrote: > Why do you need to check isExecutionContextTerminating? If the ...
4 years, 7 months ago (2016-05-26 08:18:18 UTC) #18
haraken
On 2016/05/26 08:18:18, yhirano1 wrote: > On 2016/05/26 08:08:23, haraken wrote: > > Why do ...
4 years, 7 months ago (2016-05-26 08:38:25 UTC) #19
haraken
+bashi +yukishiino
4 years, 7 months ago (2016-05-26 08:44:29 UTC) #21
yhirano
On 2016/05/26 08:38:25, haraken wrote: > On 2016/05/26 08:18:18, yhirano1 wrote: > > On 2016/05/26 ...
4 years, 7 months ago (2016-05-26 08:56:45 UTC) #22
yhirano
Also, crashes in v8::Invoke are also related and I am wondering if these crashes are ...
4 years, 7 months ago (2016-05-26 08:59:15 UTC) #23
haraken
On 2016/05/26 08:56:45, yhirano wrote: > On 2016/05/26 08:38:25, haraken wrote: > > On 2016/05/26 ...
4 years, 7 months ago (2016-05-26 09:09:50 UTC) #24
Yuki
To me, it seems better to have a following API in the binding instead of ...
4 years, 7 months ago (2016-05-26 09:14:48 UTC) #25
bashi
On 2016/05/26 08:56:45, yhirano wrote: > On 2016/05/26 08:38:25, haraken wrote: > > On 2016/05/26 ...
4 years, 7 months ago (2016-05-26 09:19:17 UTC) #26
yhirano1
4 years, 7 months ago (2016-05-26 09:32:37 UTC) #27
Message was sent while issue was closed.
> yukishiino@

nhiroki@ and I are working to solve this problem, so I think we don't need to
invent a new mechanism.

> haraken@

>> I need to check 1.
> Then you should fix the bug instead :)
Yeah, I generally put assertions to detect bugs.

> Given that we're working on the graceful shutdown which will anyway remove the
> isTermination checks, I don't think we need to stick to this issue too deeply
> (i.e., I'm okay with this CL if there is no other easy way to fix the crash).
> But please don't spread out the pattern in other places in the code base.

Thanks, I see. I am not a fan of this kind of code at all.

> bashi@
> Help me understand: What /modules/fetch or /core/streams bugs do you have in
> your mind?

If we mis-code ReadableStream.js or give wrong arguments to the script from C++,
it could throw an exception.

Powered by Google App Engine
This is Rietveld 408576698