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

Issue 1463463003: AppCache: fix a browser crashing bug that can happen during updates. (Closed)

Created:
5 years, 1 month ago by michaeln
Modified:
5 years, 1 month ago
Reviewers:
gzobqq
CC:
chromium-reviews, michaeln, darin-cc_chromium.org, jam, Will Harris
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

AppCache: fix a browser crashing bug that can happen during updates. BUG=558589 Committed: https://crrev.com/e5c298b780737c53fa9aae44d6fef522931d88b0 Cr-Commit-Position: refs/heads/master@{#360967}

Patch Set 1 #

Total comments: 7

Patch Set 2 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+11 lines, -3 lines) Patch
M content/browser/appcache/appcache_update_job.h View 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/appcache/appcache_update_job.cc View 1 3 chunks +10 lines, -3 lines 0 comments Download

Messages

Total messages: 13 (4 generated)
michaeln
not tested yet, but here's what i have in mind as a fix
5 years, 1 month ago (2015-11-20 01:51:34 UTC) #3
gzobqq
Thanks, I tested that this fix stops the PoC. https://codereview.chromium.org/1463463003/diff/1/content/browser/appcache/appcache_update_job.cc File content/browser/appcache/appcache_update_job.cc (right): https://codereview.chromium.org/1463463003/diff/1/content/browser/appcache/appcache_update_job.cc#newcode431 content/browser/appcache/appcache_update_job.cc:431: ...
5 years, 1 month ago (2015-11-20 06:10:54 UTC) #4
michaeln
thnx for looking and verifying it fixes the crash https://codereview.chromium.org/1463463003/diff/1/content/browser/appcache/appcache_update_job.cc File content/browser/appcache/appcache_update_job.cc (right): https://codereview.chromium.org/1463463003/diff/1/content/browser/appcache/appcache_update_job.cc#newcode431 content/browser/appcache/appcache_update_job.cc:431: ...
5 years, 1 month ago (2015-11-20 20:38:56 UTC) #5
gzobqq
On 2015/11/20 20:38:56, michaeln wrote: > thnx for looking and verifying it fixes the crash ...
5 years, 1 month ago (2015-11-20 21:08:05 UTC) #6
michaeln
https://codereview.chromium.org/1463463003/diff/1/content/browser/appcache/appcache_update_job.cc File content/browser/appcache/appcache_update_job.cc (right): https://codereview.chromium.org/1463463003/diff/1/content/browser/appcache/appcache_update_job.cc#newcode431 content/browser/appcache/appcache_update_job.cc:431: return; On 2015/11/20 20:38:55, michaeln wrote: > On 2015/11/20 ...
5 years, 1 month ago (2015-11-20 21:19:15 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1463463003/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1463463003/20001
5 years, 1 month ago (2015-11-20 23:00:55 UTC) #10
commit-bot: I haz the power
Committed patchset #2 (id:20001)
5 years, 1 month ago (2015-11-21 00:42:05 UTC) #11
commit-bot: I haz the power
Patchset 2 (id:??) landed as https://crrev.com/e5c298b780737c53fa9aae44d6fef522931d88b0 Cr-Commit-Position: refs/heads/master@{#360967}
5 years, 1 month ago (2015-11-21 00:43:26 UTC) #12
gzobqq
5 years, 1 month ago (2015-11-21 09:37:20 UTC) #13
Message was sent while issue was closed.
On 2015/11/20 21:19:15, michaeln wrote:
>
https://codereview.chromium.org/1463463003/diff/1/content/browser/appcache/ap...
> File content/browser/appcache/appcache_update_job.cc (right):
> 
>
https://codereview.chromium.org/1463463003/diff/1/content/browser/appcache/ap...
> content/browser/appcache/appcache_update_job.cc:431: return;
> On 2015/11/20 20:38:55, michaeln wrote:
> > On 2015/11/20 06:10:54, gzobqq wrote:
> > > Do we care about lack of host notification?
> > 
> > we care more about the crash
> > 
> > for this to happen, the master resource load must succeed a moment earlier
and
> > then fail to load a moment later. this seems like a small corner case. i
think
> > trading minor correctness errors (visible events) in that case for
robustness
> is
> > a reasonable trade.
> 
> If we were to care... looks like the sequence of expected events should be:
> CHECKING, DOWNLOADING, ERROR and AssociateNoCache(GURL())?

If I'm reading this correctly, it would be:
CHECKING
DOWNLOADING if group_->update_status() == DOWNLOADING
AssociateIncompleteCache(inprogress_cache_.get(), manifest_url_) if
inprogress_cache_
AssociateNoCache(GURL()) if inprogress_cache_
ERROR

The error notification has the difficulty that AppCacheErrorDetails takes the
(possibly redirected?) request->url() and response code. These come from the
first failed request and are not known later.

Powered by Google App Engine
This is Rietveld 408576698