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

Issue 2158123003: [MD Settings] Remove jank for webui. (Closed)

Created:
4 years, 5 months ago by groby-ooo-7-16
Modified:
4 years, 4 months ago
Reviewers:
dproy, Dan Beam, mmenke
CC:
chromium-reviews, darin-cc_chromium.org, jam
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[MD Settings] Remove jank for webui. WebUI URLRequest source data is (on desktop) backed by a memory-mapped file. Copying that data in CompleteRead can trigger jankiness due to potential file IO caused by the read. This CL moves the memcpy on the file thread. R=dbeam@chromium.org BUG=455423 Committed: https://crrev.com/b6b53857a5ad6aecc8752bccb947147d101d8417 Cr-Commit-Position: refs/heads/master@{#407698}

Patch Set 1 #

Patch Set 2 : Do all the things on a worker thread. #

Total comments: 22

Patch Set 3 : Review fixes. #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+54 lines, -29 lines) Patch
M content/browser/webui/url_data_manager_backend.cc View 1 2 5 chunks +54 lines, -29 lines 5 comments Download

Dependent Patchsets:

Messages

Total messages: 35 (16 generated)
groby-ooo-7-16
PTAL
4 years, 5 months ago (2016-07-19 23:17:15 UTC) #9
Dan Beam
disclaimer: I'm not terrrribly familiar with this code /cc mmenke@ https://codereview.chromium.org/2158123003/diff/20001/content/browser/webui/url_data_manager_backend.cc File content/browser/webui/url_data_manager_backend.cc (right): https://codereview.chromium.org/2158123003/diff/20001/content/browser/webui/url_data_manager_backend.cc#newcode114 ...
4 years, 5 months ago (2016-07-19 23:27:33 UTC) #10
mmenke
I'll plan to do a pass tomorrow.
4 years, 5 months ago (2016-07-19 23:33:46 UTC) #11
groby-ooo-7-16
https://codereview.chromium.org/2158123003/diff/20001/content/browser/webui/url_data_manager_backend.cc File content/browser/webui/url_data_manager_backend.cc (right): https://codereview.chromium.org/2158123003/diff/20001/content/browser/webui/url_data_manager_backend.cc#newcode114 content/browser/webui/url_data_manager_backend.cc:114: if (buf_size > 0) { On 2016/07/19 23:27:33, Dan ...
4 years, 5 months ago (2016-07-20 01:01:40 UTC) #12
mmenke
This seems reasonable to me, just some minor suggestions https://codereview.chromium.org/2158123003/diff/20001/content/browser/webui/url_data_manager_backend.cc File content/browser/webui/url_data_manager_backend.cc (right): https://codereview.chromium.org/2158123003/diff/20001/content/browser/webui/url_data_manager_backend.cc#newcode288 content/browser/webui/url_data_manager_backend.cc:288: ...
4 years, 5 months ago (2016-07-20 16:47:58 UTC) #14
groby-ooo-7-16
https://codereview.chromium.org/2158123003/diff/20001/content/browser/webui/url_data_manager_backend.cc File content/browser/webui/url_data_manager_backend.cc (right): https://codereview.chromium.org/2158123003/diff/20001/content/browser/webui/url_data_manager_backend.cc#newcode288 content/browser/webui/url_data_manager_backend.cc:288: task_runner_(base::WorkerPool::GetTaskRunner(false)), On 2016/07/20 16:47:58, mmenke wrote: > On 2016/07/20 ...
4 years, 5 months ago (2016-07-20 18:10:12 UTC) #15
mmenke
LGTM. Some responses and another comment, but it's fine as-is. https://codereview.chromium.org/2158123003/diff/20001/content/browser/webui/url_data_manager_backend.cc File content/browser/webui/url_data_manager_backend.cc (right): https://codereview.chromium.org/2158123003/diff/20001/content/browser/webui/url_data_manager_backend.cc#newcode421 ...
4 years, 5 months ago (2016-07-20 18:19:44 UTC) #18
Dan Beam
lgtm but consider classifying this as slow if it hits disk as mmenke@ has said ...
4 years, 5 months ago (2016-07-20 19:16:28 UTC) #21
groby-ooo-7-16
Will land as-is, but have a potential follow-up on which worker pool to use. (Request ...
4 years, 4 months ago (2016-07-26 02:37:45 UTC) #22
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/2158123003/40001
4 years, 4 months ago (2016-07-26 02:38:10 UTC) #24
mmenke
On 2016/07/26 02:37:45, groby wrote: > Will land as-is, but have a potential follow-up on ...
4 years, 4 months ago (2016-07-26 02:46:54 UTC) #25
groby-ooo-7-16
On 2016/07/26 02:46:54, mmenke wrote: > On 2016/07/26 02:37:45, groby wrote: > > Will land ...
4 years, 4 months ago (2016-07-26 03:01:38 UTC) #26
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 4 months ago (2016-07-26 03:27:04 UTC) #27
commit-bot: I haz the power
Patchset 3 (id:??) landed as https://crrev.com/b6b53857a5ad6aecc8752bccb947147d101d8417 Cr-Commit-Position: refs/heads/master@{#407698}
4 years, 4 months ago (2016-07-26 03:31:07 UTC) #29
groby-ooo-7-16
> I'd say change them both to true in a followup, assuming the answer is ...
4 years, 4 months ago (2016-07-26 20:48:11 UTC) #30
mmenke
On 2016/07/26 20:48:11, groby wrote: > > I'd say change them both to true in ...
4 years, 4 months ago (2016-07-27 14:20:15 UTC) #31
dproy
https://codereview.chromium.org/2158123003/diff/40001/content/browser/webui/url_data_manager_backend.cc File content/browser/webui/url_data_manager_backend.cc (right): https://codereview.chromium.org/2158123003/diff/40001/content/browser/webui/url_data_manager_backend.cc#newcode396 content/browser/webui/url_data_manager_backend.cc:396: pending_buf_ = nullptr; Drive-by comment since we had to ...
4 years, 4 months ago (2016-07-27 18:15:23 UTC) #33
groby-ooo-7-16
https://codereview.chromium.org/2158123003/diff/40001/content/browser/webui/url_data_manager_backend.cc File content/browser/webui/url_data_manager_backend.cc (right): https://codereview.chromium.org/2158123003/diff/40001/content/browser/webui/url_data_manager_backend.cc#newcode396 content/browser/webui/url_data_manager_backend.cc:396: pending_buf_ = nullptr; On 2016/07/27 18:15:23, dproy1 wrote: > ...
4 years, 4 months ago (2016-08-22 17:20:25 UTC) #34
mmenke
4 years, 4 months ago (2016-08-22 17:25:52 UTC) #35
Message was sent while issue was closed.
https://codereview.chromium.org/2158123003/diff/40001/content/browser/webui/u...
File content/browser/webui/url_data_manager_backend.cc (right):

https://codereview.chromium.org/2158123003/diff/40001/content/browser/webui/u...
content/browser/webui/url_data_manager_backend.cc:396: pending_buf_ = nullptr;
On 2016/08/22 17:20:24, groby wrote:
> On 2016/07/27 18:15:23, dproy1 wrote:
> > Drive-by comment since we had to revert this CL because of crbug.com/631812:

> > I was interested in understanding better why this line was crashing chrome
and
> > it seems ReadRawDataComplete destroys the URLRequestJob, including its
member
> > variable pending_buf_. When we assign nullptr to pending_buf_ in the next
> line,
> > it tries to release whatever pending_buf_ was pointing to, which now happens
> to
> > be garbage memory, and so we get a segfault.
> > 
> > Perhaps moving the nullptr assignment up two lines will fix the issue? This
is
> > how it worked before; the null assignment was done before
ReadRawDataComplete.
> 
> > 
> > I don't know to full context of this CL so cannot say definitively if this
is
> a
> > proper fix, but I checked that this prevents the crash. Hope this helps. 
> 
> That does seem to be the issue. Finally investigating, thanks for the
heads-up!

Hrm...Surely some of our browser tests run this code.  Wonder why they didn't
catch this.

Powered by Google App Engine
This is Rietveld 408576698