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

Issue 2866643005: [Offline pages] Stop observing web contents and reset to null after use. Only create a new web cont… (Closed)

Created:
3 years, 7 months ago by chili
Modified:
3 years, 7 months ago
CC:
chromium-reviews, romax+watch_chromium.org, fgorski+watch_chromium.org, dewittj+watch_chromium.org, petewil+watch_chromium.org, chili+watch_chromium.org, dimich+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

[Offline pages] Stop observing web contents and reset to null after use. Only create a new web contents when we need it. Before this change, we will create a new webcontents in preparation for a request that might not come in for hours or days. During the waiting period, a number of things can happen which may result in things related to the webcontents to become stale and therefore crash when we actually do use it. One hypothesis is that a render process host might be created without any render processes attached to it, causing the host to be removed under certain memory pressures or when certain clean-up processes are triggered. For better memory and freshness, we should probably only create a web contents when we actually need it anyway, and clean up everything after we use it. BUG=714272, 709443 Review-Url: https://codereview.chromium.org/2866643005 Cr-Commit-Position: refs/heads/master@{#469906} Committed: https://chromium.googlesource.com/chromium/src/+/e427c75396a3388f0b64915128a371bb1c5793f0

Patch Set 1 #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+21 lines, -14 lines) Patch
M chrome/browser/android/offline_pages/background_loader_offliner.h View 2 chunks +8 lines, -2 lines 0 comments Download
M chrome/browser/android/offline_pages/background_loader_offliner.cc View 2 chunks +10 lines, -7 lines 4 comments Download
M chrome/browser/android/offline_pages/background_loader_offliner_unittest.cc View 2 chunks +3 lines, -5 lines 0 comments Download

Messages

Total messages: 17 (9 generated)
chili
Hopefully this will fix the crashing?
3 years, 7 months ago (2017-05-05 20:37:15 UTC) #4
Pete Williamson
lgtm
3 years, 7 months ago (2017-05-05 21:00:03 UTC) #5
dewittj
lgtm Any way you can add a test? https://codereview.chromium.org/2866643005/diff/1/chrome/browser/android/offline_pages/background_loader_offliner.cc File chrome/browser/android/offline_pages/background_loader_offliner.cc (right): https://codereview.chromium.org/2866643005/diff/1/chrome/browser/android/offline_pages/background_loader_offliner.cc#newcode289 chrome/browser/android/offline_pages/background_loader_offliner.cc:289: ResetState(); ...
3 years, 7 months ago (2017-05-05 21:26:16 UTC) #6
chili
https://codereview.chromium.org/2866643005/diff/1/chrome/browser/android/offline_pages/background_loader_offliner.cc File chrome/browser/android/offline_pages/background_loader_offliner.cc (right): https://codereview.chromium.org/2866643005/diff/1/chrome/browser/android/offline_pages/background_loader_offliner.cc#newcode289 chrome/browser/android/offline_pages/background_loader_offliner.cc:289: ResetState(); On 2017/05/05 21:26:16, dewittj wrote: > nit: ResetState ...
3 years, 7 months ago (2017-05-05 21:34:23 UTC) #7
carlosk
RS LGTM. Can you also add more detailed explanation of the reasoning behind this change ...
3 years, 7 months ago (2017-05-05 21:49:48 UTC) #8
chili
https://codereview.chromium.org/2866643005/diff/1/chrome/browser/android/offline_pages/background_loader_offliner.cc File chrome/browser/android/offline_pages/background_loader_offliner.cc (right): https://codereview.chromium.org/2866643005/diff/1/chrome/browser/android/offline_pages/background_loader_offliner.cc#newcode289 chrome/browser/android/offline_pages/background_loader_offliner.cc:289: ResetState(); On 2017/05/05 21:49:48, carlosk wrote: > On 2017/05/05 ...
3 years, 7 months ago (2017-05-06 00:21:17 UTC) #12
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/2866643005/1
3 years, 7 months ago (2017-05-08 03:30:44 UTC) #14
commit-bot: I haz the power
3 years, 7 months ago (2017-05-08 04:12:20 UTC) #17
Message was sent while issue was closed.
Committed patchset #1 (id:1) as
https://chromium.googlesource.com/chromium/src/+/e427c75396a3388f0b64915128a3...

Powered by Google App Engine
This is Rietveld 408576698