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

Issue 1539803002: [Fetch API] Fix a memory leak with a Response constructed with a ReadableStream (Closed)

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

Description

[Fetch API] Fix a memory leak with a Response constructed with a ReadableStream This CL fixes a memory leak with a Response constructed with a ReadableStream by holding a weak persistent in ReadableStreamDataConsumerHandle. The stream reader will be kept alive by the hidden reference in Response. BUG=564479 Committed: https://crrev.com/f1bb6e7acafff4116f8f6100f9612c93930c2ecc Cr-Commit-Position: refs/heads/master@{#375196}

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Total comments: 18

Patch Set 4 : #

Total comments: 14

Patch Set 5 : #

Patch Set 6 : #

Patch Set 7 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+186 lines, -83 lines) Patch
M third_party/WebKit/Source/bindings/core/v8/V8HiddenValue.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/fetch/ReadableStreamDataConsumerHandle.h View 1 2 3 1 chunk +7 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/modules/fetch/ReadableStreamDataConsumerHandle.cpp View 1 2 3 4 5 6 9 chunks +49 lines, -44 lines 0 comments Download
M third_party/WebKit/Source/modules/fetch/ReadableStreamDataConsumerHandleTest.cpp View 1 2 3 11 chunks +104 lines, -32 lines 0 comments Download
M third_party/WebKit/Source/modules/fetch/Response.cpp View 1 2 3 4 4 chunks +25 lines, -1 line 0 comments Download

Messages

Total messages: 29 (8 generated)
yhirano
5 years ago (2015-12-18 06:26:39 UTC) #3
yhirano
ping
4 years, 11 months ago (2016-01-06 04:22:39 UTC) #4
bashi
lgtm https://codereview.chromium.org/1539803002/diff/40001/third_party/WebKit/Source/modules/fetch/Response.cpp File third_party/WebKit/Source/modules/fetch/Response.cpp (right): https://codereview.chromium.org/1539803002/diff/40001/third_party/WebKit/Source/modules/fetch/Response.cpp#newcode144 third_party/WebKit/Source/modules/fetch/Response.cpp:144: bodyHandle = ReadableStreamDataConsumerHandle::create(scriptState, reader.v8Value().As<v8::Object>()); just to clarify: reader.v8Value() ...
4 years, 11 months ago (2016-01-06 05:39:17 UTC) #6
haraken
https://codereview.chromium.org/1539803002/diff/40001/third_party/WebKit/Source/bindings/core/v8/V8HiddenValue.h File third_party/WebKit/Source/bindings/core/v8/V8HiddenValue.h (right): https://codereview.chromium.org/1539803002/diff/40001/third_party/WebKit/Source/bindings/core/v8/V8HiddenValue.h#newcode43 third_party/WebKit/Source/bindings/core/v8/V8HiddenValue.h:43: V(readableStreamReaderInResponse) \ alphabetical order. https://codereview.chromium.org/1539803002/diff/40001/third_party/WebKit/Source/modules/fetch/ReadableStreamDataConsumerHandle.cpp File third_party/WebKit/Source/modules/fetch/ReadableStreamDataConsumerHandle.cpp (right): https://codereview.chromium.org/1539803002/diff/40001/third_party/WebKit/Source/modules/fetch/ReadableStreamDataConsumerHandle.cpp#newcode274 ...
4 years, 11 months ago (2016-01-06 05:49:06 UTC) #8
yhirano
https://codereview.chromium.org/1539803002/diff/40001/third_party/WebKit/Source/bindings/core/v8/V8HiddenValue.h File third_party/WebKit/Source/bindings/core/v8/V8HiddenValue.h (right): https://codereview.chromium.org/1539803002/diff/40001/third_party/WebKit/Source/bindings/core/v8/V8HiddenValue.h#newcode43 third_party/WebKit/Source/bindings/core/v8/V8HiddenValue.h:43: V(readableStreamReaderInResponse) \ On 2016/01/06 05:49:06, haraken wrote: > > ...
4 years, 11 months ago (2016-01-26 05:09:33 UTC) #9
haraken
https://codereview.chromium.org/1539803002/diff/40001/third_party/WebKit/Source/modules/fetch/ReadableStreamDataConsumerHandle.cpp File third_party/WebKit/Source/modules/fetch/ReadableStreamDataConsumerHandle.cpp (right): https://codereview.chromium.org/1539803002/diff/40001/third_party/WebKit/Source/modules/fetch/ReadableStreamDataConsumerHandle.cpp#newcode274 third_party/WebKit/Source/modules/fetch/ReadableStreamDataConsumerHandle.cpp:274: data.GetParameter()->onCollected(); On 2016/01/26 05:09:32, yhirano wrote: > On 2016/01/06 ...
4 years, 11 months ago (2016-01-26 06:09:06 UTC) #10
yhirano
ping?
4 years, 10 months ago (2016-01-29 11:43:08 UTC) #11
haraken
Sorry for the review delay! Mostly looks good. https://codereview.chromium.org/1539803002/diff/60001/third_party/WebKit/Source/modules/fetch/ReadableStreamDataConsumerHandle.cpp File third_party/WebKit/Source/modules/fetch/ReadableStreamDataConsumerHandle.cpp (right): https://codereview.chromium.org/1539803002/diff/60001/third_party/WebKit/Source/modules/fetch/ReadableStreamDataConsumerHandle.cpp#newcode165 third_party/WebKit/Source/modules/fetch/ReadableStreamDataConsumerHandle.cpp:165: ReadableStreamOperations::read(m_scriptState.get(), ...
4 years, 10 months ago (2016-01-30 15:35:53 UTC) #12
yhirano
https://codereview.chromium.org/1539803002/diff/60001/third_party/WebKit/Source/modules/fetch/ReadableStreamDataConsumerHandle.cpp File third_party/WebKit/Source/modules/fetch/ReadableStreamDataConsumerHandle.cpp (right): https://codereview.chromium.org/1539803002/diff/60001/third_party/WebKit/Source/modules/fetch/ReadableStreamDataConsumerHandle.cpp#newcode165 third_party/WebKit/Source/modules/fetch/ReadableStreamDataConsumerHandle.cpp:165: ReadableStreamOperations::read(m_scriptState.get(), reader).then( On 2016/01/30 15:35:53, haraken wrote: > > ...
4 years, 10 months ago (2016-02-02 10:59:28 UTC) #13
haraken
https://codereview.chromium.org/1539803002/diff/60001/third_party/WebKit/Source/modules/fetch/ReadableStreamDataConsumerHandle.cpp File third_party/WebKit/Source/modules/fetch/ReadableStreamDataConsumerHandle.cpp (right): https://codereview.chromium.org/1539803002/diff/60001/third_party/WebKit/Source/modules/fetch/ReadableStreamDataConsumerHandle.cpp#newcode165 third_party/WebKit/Source/modules/fetch/ReadableStreamDataConsumerHandle.cpp:165: ReadableStreamOperations::read(m_scriptState.get(), reader).then( On 2016/02/02 10:59:28, yhirano wrote: > On ...
4 years, 10 months ago (2016-02-02 12:23:06 UTC) #14
yhirano
https://codereview.chromium.org/1539803002/diff/60001/third_party/WebKit/Source/modules/fetch/ReadableStreamDataConsumerHandle.cpp File third_party/WebKit/Source/modules/fetch/ReadableStreamDataConsumerHandle.cpp (right): https://codereview.chromium.org/1539803002/diff/60001/third_party/WebKit/Source/modules/fetch/ReadableStreamDataConsumerHandle.cpp#newcode165 third_party/WebKit/Source/modules/fetch/ReadableStreamDataConsumerHandle.cpp:165: ReadableStreamOperations::read(m_scriptState.get(), reader).then( On 2016/02/02 12:23:06, haraken wrote: > On ...
4 years, 10 months ago (2016-02-05 14:52:04 UTC) #15
yhirano
ping?
4 years, 10 months ago (2016-02-11 23:10:16 UTC) #16
haraken
On 2016/02/05 14:52:04, yhirano wrote: > https://codereview.chromium.org/1539803002/diff/60001/third_party/WebKit/Source/modules/fetch/ReadableStreamDataConsumerHandle.cpp > File > third_party/WebKit/Source/modules/fetch/ReadableStreamDataConsumerHandle.cpp > (right): > > ...
4 years, 10 months ago (2016-02-12 04:31:51 UTC) #17
yhirano
On 2016/02/12 04:31:51, haraken wrote: > On 2016/02/05 14:52:04, yhirano wrote: > > > https://codereview.chromium.org/1539803002/diff/60001/third_party/WebKit/Source/modules/fetch/ReadableStreamDataConsumerHandle.cpp ...
4 years, 10 months ago (2016-02-12 06:43:47 UTC) #18
haraken
On 2016/02/12 06:43:47, yhirano wrote: > On 2016/02/12 04:31:51, haraken wrote: > > On 2016/02/05 ...
4 years, 10 months ago (2016-02-12 06:49:48 UTC) #19
tyoshino (SeeGerritForStatus)
lgtm https://codereview.chromium.org/1539803002/diff/40001/third_party/WebKit/Source/modules/fetch/ReadableStreamDataConsumerHandle.cpp File third_party/WebKit/Source/modules/fetch/ReadableStreamDataConsumerHandle.cpp (right): https://codereview.chromium.org/1539803002/diff/40001/third_party/WebKit/Source/modules/fetch/ReadableStreamDataConsumerHandle.cpp#newcode136 third_party/WebKit/Source/modules/fetch/ReadableStreamDataConsumerHandle.cpp:136: static PassRefPtr<ReadingContext> create(ScriptState* scriptState, v8::Local<v8::Object> stream) streamReader
4 years, 10 months ago (2016-02-12 07:24:21 UTC) #20
tyoshino (SeeGerritForStatus)
https://codereview.chromium.org/1539803002/diff/40001/third_party/WebKit/Source/modules/fetch/ReadableStreamDataConsumerHandle.cpp File third_party/WebKit/Source/modules/fetch/ReadableStreamDataConsumerHandle.cpp (right): https://codereview.chromium.org/1539803002/diff/40001/third_party/WebKit/Source/modules/fetch/ReadableStreamDataConsumerHandle.cpp#newcode136 third_party/WebKit/Source/modules/fetch/ReadableStreamDataConsumerHandle.cpp:136: static PassRefPtr<ReadingContext> create(ScriptState* scriptState, v8::Local<v8::Object> stream) On 2016/02/12 at ...
4 years, 10 months ago (2016-02-12 07:25:05 UTC) #21
yhirano
https://codereview.chromium.org/1539803002/diff/40001/third_party/WebKit/Source/modules/fetch/ReadableStreamDataConsumerHandle.cpp File third_party/WebKit/Source/modules/fetch/ReadableStreamDataConsumerHandle.cpp (right): https://codereview.chromium.org/1539803002/diff/40001/third_party/WebKit/Source/modules/fetch/ReadableStreamDataConsumerHandle.cpp#newcode136 third_party/WebKit/Source/modules/fetch/ReadableStreamDataConsumerHandle.cpp:136: static PassRefPtr<ReadingContext> create(ScriptState* scriptState, v8::Local<v8::Object> stream) On 2016/02/12 07:25:05, ...
4 years, 10 months ago (2016-02-12 07:33:54 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1539803002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1539803002/120001
4 years, 10 months ago (2016-02-12 17:30:11 UTC) #25
commit-bot: I haz the power
Committed patchset #7 (id:120001)
4 years, 10 months ago (2016-02-12 18:19:13 UTC) #27
commit-bot: I haz the power
4 years, 10 months ago (2016-02-16 22:43:34 UTC) #29
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/f1bb6e7acafff4116f8f6100f9612c93930c2ecc
Cr-Commit-Position: refs/heads/master@{#375196}

Powered by Google App Engine
This is Rietveld 408576698