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

Issue 2163073002: Avoid crashing if MHTMLGenerationManager::JobFinished is called twice. (Closed)

Created:
4 years, 5 months ago by Łukasz Anforowicz
Modified:
4 years, 5 months ago
CC:
chromium-reviews, asanka, 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

Avoid crashing if MHTMLGenerationManager::JobFinished is called twice. This CL makes sure that MHTMLGenerationManager::JobFinished is idempotent and doesn't do anything when called for a second time. This avoids the crash from the linked bug. BUG=612098 Committed: https://crrev.com/a668d7811c2c19662cbeec9e10a3e283292445e5 Cr-Commit-Position: refs/heads/master@{#407244}

Patch Set 1 #

Total comments: 4

Patch Set 2 : Extra IPC sanitization + simpler idempotency. #

Patch Set 3 : Repro test for the crash. #

Patch Set 4 : Posting the injection ->UI->FILE->UI. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+174 lines, -20 lines) Patch
M content/browser/download/docs/save-page-as.md View 1 1 chunk +10 lines, -7 lines 0 comments Download
M content/browser/download/mhtml_generation_browsertest.cc View 1 2 3 3 chunks +121 lines, -0 lines 0 comments Download
M content/browser/download/mhtml_generation_manager.h View 1 1 chunk +4 lines, -0 lines 0 comments Download
M content/browser/download/mhtml_generation_manager.cc View 1 10 chunks +39 lines, -13 lines 0 comments Download

Messages

Total messages: 26 (8 generated)
Łukasz Anforowicz
Randy + Justin, can you take a look? I've confirmed (with some printf-style debugging) that ...
4 years, 5 months ago (2016-07-19 23:27:37 UTC) #2
dewittj
this lgtm, but it all makes me wonder if there is a better ownership model ...
4 years, 5 months ago (2016-07-20 16:37:48 UTC) #3
Randy Smith (Not in Mondays)
LGTM either way, but if it would work to just stop observation on JobFinished(), do ...
4 years, 5 months ago (2016-07-20 16:46:58 UTC) #4
Randy Smith (Not in Mondays)
Oh, whoops, two followon comments: * Test for this case? * When reading the code ...
4 years, 5 months ago (2016-07-20 16:48:20 UTC) #5
Łukasz Anforowicz
Can you take another look please? On 2016/07/20 16:48:20, Randy Smith - Not in Fridays ...
4 years, 5 months ago (2016-07-20 21:10:07 UTC) #6
Randy Smith (Not in Mondays)
On 2016/07/20 21:10:07, Łukasz Anforowicz wrote: > Can you take another look please? > > ...
4 years, 5 months ago (2016-07-20 22:47:33 UTC) #7
Randy Smith (Not in Mondays)
Whoops, also one comment. https://codereview.chromium.org/2163073002/diff/1/content/browser/download/mhtml_generation_manager.cc File content/browser/download/mhtml_generation_manager.cc (right): https://codereview.chromium.org/2163073002/diff/1/content/browser/download/mhtml_generation_manager.cc#newcode404 content/browser/download/mhtml_generation_manager.cc:404: job->MarkAsFinished(); On 2016/07/20 21:10:07, Łukasz ...
4 years, 5 months ago (2016-07-20 22:47:49 UTC) #8
Łukasz Anforowicz
On 2016/07/20 22:47:33, Randy Smith - Not in Fridays wrote: > Ok, I thought I ...
4 years, 5 months ago (2016-07-20 22:53:11 UTC) #9
Łukasz Anforowicz
Randy, I have a repro test in the latest patchset. It consistently fails on my ...
4 years, 5 months ago (2016-07-21 21:11:29 UTC) #10
dewittj
does a regular PostTask without delay repro the failure?
4 years, 5 months ago (2016-07-21 21:14:45 UTC) #11
Łukasz Anforowicz
On 2016/07/21 21:14:45, dewittj wrote: > does a regular PostTask without delay repro the failure? ...
4 years, 5 months ago (2016-07-21 21:24:56 UTC) #12
Randy Smith (Not in Mondays)
On 2016/07/21 21:24:56, Łukasz Anforowicz wrote: > On 2016/07/21 21:14:45, dewittj wrote: > > does ...
4 years, 5 months ago (2016-07-21 21:34:25 UTC) #13
Łukasz Anforowicz
On 2016/07/21 21:34:25, Randy Smith - Not in Fridays wrote: > On 2016/07/21 21:24:56, Łukasz ...
4 years, 5 months ago (2016-07-21 22:50:30 UTC) #14
Łukasz Anforowicz
I assume it is okay to land this CL in the current shape. Please shout ...
4 years, 5 months ago (2016-07-22 16:34:44 UTC) #15
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/2163073002/60001
4 years, 5 months ago (2016-07-22 19:33:38 UTC) #22
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 5 months ago (2016-07-22 20:22:01 UTC) #23
commit-bot: I haz the power
Patchset 4 (id:??) landed as https://crrev.com/a668d7811c2c19662cbeec9e10a3e283292445e5 Cr-Commit-Position: refs/heads/master@{#407244}
4 years, 5 months ago (2016-07-22 20:25:45 UTC) #25
Randy Smith (Not in Mondays)
4 years, 5 months ago (2016-07-23 14:06:35 UTC) #26
Message was sent while issue was closed.
Still/again LGTM.  Sorry to not get back to you yesterday; busy, messy day.

Powered by Google App Engine
This is Rietveld 408576698