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

Issue 1323793002: PlzNavigate: add PDF viewer bypass hack to avoid crash.

Created:
5 years, 3 months ago by carlosk
Modified:
5 years, 3 months ago
CC:
chromium-reviews, 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

PlzNavigate: add PDF viewer bypass hack to avoid crash. This adds a little hack to avoid a crash in BrowserTest.InterstitialCancelsGuestViewDialogswhen opening a PDF in Chromium when PlzNavigate is enabled. This still doesn't make the test pass but makes it timeout instead of crash. The final solution for this problem will come with PlzFetch [1]. [1]: https://docs.google.com/document/d/1OpgSP0qtHzweXjTpcHTMg6n2XtB2zSg6YIqbGpmxJNY/edit?usp=sharing BUG=504347

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+8 lines, -2 lines) Patch
M content/browser/loader/mime_type_resource_handler.cc View 3 chunks +7 lines, -1 line 1 comment Download
M content/browser/loader/navigation_resource_handler.cc View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 3 (1 generated)
carlosk
davidben@: PTAL. others: FYI. davidben@: let me know if this is what you had in ...
5 years, 3 months ago (2015-08-31 16:55:00 UTC) #2
davidben
5 years, 3 months ago (2015-09-01 18:22:56 UTC) #3
https://codereview.chromium.org/1323793002/diff/1/content/browser/loader/mime...
File content/browser/loader/mime_type_resource_handler.cc (right):

https://codereview.chromium.org/1323793002/diff/1/content/browser/loader/mime...
content/browser/loader/mime_type_resource_handler.cc:426: (info->IsDownload() ||
info->is_stream()))) {
I was actually thinking we should do:

if (!plz_navigate || !is_a_navigation) {
  // Current logic. Send either OnResponseStarted + OnResponseCompleted or
OnResponseStarted + OnWillRead + OnReadCompleted + OnResponseStarted depending
on payload_for_old_handler
} else {
  // Only send OnResponseCompleted with ERR_ABORTED and nothing else at all.
}

And then the entire info->IsDownload() || info->is_stream() check in
NavigationResourceHandler can go away completely. That's only needed because we
send OnResponseStarted for intercepted navigations, in turn only needed because
we send the request to DevTools that way by way of the renderer. But since we're
going to need to come up with another way to get the request to DevTools, may as
well not bother at all.

(Not sure if is_a_navigation should check for MAIN_FRAME or MAIN_FRAME +
SUB_FRAME. How does PlzNavigate on + OOPIF off behave? Does that exist?)

Powered by Google App Engine
This is Rietveld 408576698