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

Issue 288353002: [dom_distiller] Fix crash for invalid chrome-distiller:// requests (Closed)

Created:
6 years, 7 months ago by nyquist
Modified:
6 years, 7 months ago
Reviewers:
Yaron
CC:
chromium-reviews
Visibility:
Public.

Description

[dom_distiller] Fix crash for invalid chrome-distiller:// requests When the DomDistillerViewerSource got a request for chrome-distiller://foobar/ it would crash if there was an empty path argument. This CL adds a safety check for the length of the path, to ensure to not take a substring of an empty string. In addition, this adds regression tests for the crash it fixes. It also fixes the rest of the disabled browser tests for the DomDistillerViewerSource. BUG=356866 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=271178

Patch Set 1 #

Patch Set 2 : Remove unnecessary changes #

Patch Set 3 : Rebaseed #

Patch Set 4 : Fixed crash and updated tests #

Patch Set 5 : Moar simple #

Patch Set 6 : Change to use ASSERT_TRUE instead of DCHECK #

Total comments: 2

Patch Set 7 : Added expect_distiller_page_ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+57 lines, -99 lines) Patch
M chrome/browser/dom_distiller/dom_distiller_viewer_source_browsertest.cc View 1 2 3 4 5 6 5 chunks +51 lines, -97 lines 0 comments Download
M components/dom_distiller/content/dom_distiller_viewer_source.cc View 1 2 3 1 chunk +6 lines, -2 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
nyquist
yfriedman: PTAL
6 years, 7 months ago (2014-05-16 07:07:33 UTC) #1
Yaron
https://codereview.chromium.org/288353002/diff/100001/chrome/browser/dom_distiller/dom_distiller_viewer_source_browsertest.cc File chrome/browser/dom_distiller/dom_distiller_viewer_source_browsertest.cc (right): https://codereview.chromium.org/288353002/diff/100001/chrome/browser/dom_distiller/dom_distiller_viewer_source_browsertest.cc#newcode110 chrome/browser/dom_distiller/dom_distiller_viewer_source_browsertest.cc:110: EXPECT_CALL(*distiller_page_factory_, CreateDistillerPageImpl()) I think this is needed even in ...
6 years, 7 months ago (2014-05-16 17:07:42 UTC) #2
nyquist
yfriedman: PTAL https://codereview.chromium.org/288353002/diff/100001/chrome/browser/dom_distiller/dom_distiller_viewer_source_browsertest.cc File chrome/browser/dom_distiller/dom_distiller_viewer_source_browsertest.cc (right): https://codereview.chromium.org/288353002/diff/100001/chrome/browser/dom_distiller/dom_distiller_viewer_source_browsertest.cc#newcode110 chrome/browser/dom_distiller/dom_distiller_viewer_source_browsertest.cc:110: EXPECT_CALL(*distiller_page_factory_, CreateDistillerPageImpl()) On 2014/05/16 17:07:42, Yaron wrote: ...
6 years, 7 months ago (2014-05-16 18:46:44 UTC) #3
Yaron
lgtm
6 years, 7 months ago (2014-05-16 19:46:58 UTC) #4
nyquist
The CQ bit was checked by nyquist@chromium.org
6 years, 7 months ago (2014-05-16 19:57:06 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/nyquist@chromium.org/288353002/120001
6 years, 7 months ago (2014-05-16 19:57:32 UTC) #6
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). Please consider checking whether the failures are ...
6 years, 7 months ago (2014-05-16 21:16:57 UTC) #7
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). Please consider checking whether the failures are ...
6 years, 7 months ago (2014-05-17 04:11:38 UTC) #8
commit-bot: I haz the power
6 years, 7 months ago (2014-05-17 05:30:07 UTC) #9
Message was sent while issue was closed.
Change committed as 271178

Powered by Google App Engine
This is Rietveld 408576698