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

Issue 267793002: net: Avoid recursion in URLRequestJob::ReadFilteredData. (Closed)

Created:
6 years, 7 months ago by rvargas (doing something else)
Modified:
6 years, 7 months ago
Reviewers:
wtc
CC:
chromium-reviews, cbentzel+watch_chromium.org
Visibility:
Public.

Description

net: Avoid recursion in URLRequestJob::ReadFilteredData. There's no need to use recursion when getting the data from a filter. This version uses a loop instead. The issue with recursion is that it opens the door to stack exhaustion if there is no way to limit its depth. In this case, that would be a hard thing to do given that it basically depends on interactions outside of our control. BUG=366149 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=268030

Patch Set 1 #

Total comments: 6

Patch Set 2 : Address comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+135 lines, -106 lines) Patch
M net/http/http_transaction_unittest.h View 1 chunk +2 lines, -1 line 0 comments Download
M net/http/http_transaction_unittest.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M net/url_request/url_request_job.cc View 1 1 chunk +95 lines, -103 lines 0 comments Download
M net/url_request/url_request_job_unittest.cc View 1 2 chunks +36 lines, -2 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
rvargas (doing something else)
PTAL
6 years, 7 months ago (2014-05-02 19:00:45 UTC) #1
wtc
Patch set 1 LGTM. The CL's description should explain why recursion is bad. (I reviewed ...
6 years, 7 months ago (2014-05-02 22:59:13 UTC) #2
rvargas (doing something else)
Thanks! https://codereview.chromium.org/267793002/diff/1/net/url_request/url_request_job.cc File net/url_request/url_request_job.cc (left): https://codereview.chromium.org/267793002/diff/1/net/url_request/url_request_job.cc#oldcode648 net/url_request/url_request_job.cc:648: DVLOG(2) << __FUNCTION__ << "() " On 2014/05/02 ...
6 years, 7 months ago (2014-05-03 00:19:33 UTC) #3
rvargas (doing something else)
The CQ bit was checked by rvargas@chromium.org
6 years, 7 months ago (2014-05-03 01:52:16 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rvargas@chromium.org/267793002/10001
6 years, 7 months ago (2014-05-03 01:53:03 UTC) #5
commit-bot: I haz the power
6 years, 7 months ago (2014-05-03 03:30:08 UTC) #6
Message was sent while issue was closed.
Change committed as 268030

Powered by Google App Engine
This is Rietveld 408576698