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

Issue 397713005: Ensure pdf plugin sends DidStartLoading() consistently (Closed)

Created:
6 years, 5 months ago by Nate Chapin
Modified:
6 years, 5 months ago
CC:
chromium-reviews, darin-cc_chromium.org, nasko+codewatch_chromium.org, jam, creis+watch_chromium.org
Project:
chromium
Visibility:
Public.

Description

Ensure pdf plugin sends DidStartLoading() consistently There are situations where the pdf plugin will initialize itself in such a way that it never notifies content/renderer/ that it has started. In so doing, it also fails to send a stop message, since it tries to ensure it doesn't send mismatched start/stop messages. Print preview decides when to display the preview based on when loading stops. Since this only considers the page's content and not the pdf plugin's initialization, there is a race condition where we may try to preview before the plugin is ready. In this cases, we show "Loading preivew..." and never load the actual preview. There is a hack in place in print_preview_web_helper.cc to delay the process of showing the preview to maximize the chance that the pdf plugin will be ready. This change should allow us to rip that out. BUG=376969 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=283837

Patch Set 1 #

Patch Set 2 : #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+6 lines, -5 lines) Patch
M chrome/renderer/printing/print_web_view_helper.cc View 1 chunk +2 lines, -5 lines 0 comments Download
M pdf/instance.cc View 1 chunk +4 lines, -0 lines 2 comments Download

Messages

Total messages: 8 (0 generated)
Nate Chapin
vitalybuka: Please review the revert of the nasty hack in print_web_view_helper.cc :) jam: Please review ...
6 years, 5 months ago (2014-07-16 18:13:40 UTC) #1
Vitaly Buka (NO REVIEWS)
lgtm https://codereview.chromium.org/397713005/diff/20001/pdf/instance.cc File pdf/instance.cc (right): https://codereview.chromium.org/397713005/diff/20001/pdf/instance.cc#newcode353 pdf/instance.cc:353: DCHECK(!did_call_start_loading_); Maybe CHECK() to make crash in release, ...
6 years, 5 months ago (2014-07-16 18:32:45 UTC) #2
jam
https://codereview.chromium.org/397713005/diff/20001/pdf/instance.cc File pdf/instance.cc (right): https://codereview.chromium.org/397713005/diff/20001/pdf/instance.cc#newcode355 pdf/instance.cc:355: did_call_start_loading_ = true; I'm a bit confused, I tried ...
6 years, 5 months ago (2014-07-16 21:25:43 UTC) #3
Nate Chapin
On 2014/07/16 21:25:43, jam wrote: > https://codereview.chromium.org/397713005/diff/20001/pdf/instance.cc > File pdf/instance.cc (right): > > https://codereview.chromium.org/397713005/diff/20001/pdf/instance.cc#newcode355 > ...
6 years, 5 months ago (2014-07-16 21:39:06 UTC) #4
jam
thanks, i wasn't trying those steps. lgtm
6 years, 5 months ago (2014-07-17 17:23:54 UTC) #5
jam
The CQ bit was checked by jam@chromium.org
6 years, 5 months ago (2014-07-17 17:23:59 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/japhet@chromium.org/397713005/20001
6 years, 5 months ago (2014-07-17 17:25:13 UTC) #7
commit-bot: I haz the power
6 years, 5 months ago (2014-07-17 19:19:31 UTC) #8
Message was sent while issue was closed.
Change committed as 283837

Powered by Google App Engine
This is Rietveld 408576698