mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Skip GetNewBrowserInfo call for PDF renderer processes (see issue #3047)
With PdfUnseasoned the PDF file will be loaded in a dedicated renderer process. We identify this process by adding the kPdfRenderer command-line flag (similar to how kExtensionProcess is used to identify an extension renderer process). We then avoid calling GetNewBrowserInfo for the PDF renderer process because we know the request will otherwise time out.
This commit is contained in:
@@ -531,6 +531,7 @@ void CefBrowserInfoManager::CancelNewBrowserInfoResponse(
|
||||
void CefBrowserInfoManager::TimeoutNewBrowserInfoResponse(
|
||||
const content::GlobalRenderFrameHostId& global_id,
|
||||
int timeout_id) {
|
||||
CEF_REQUIRE_UIT();
|
||||
if (!g_info_manager)
|
||||
return;
|
||||
|
||||
@@ -544,6 +545,13 @@ void CefBrowserInfoManager::TimeoutNewBrowserInfoResponse(
|
||||
if (pending_info->timeout_id != timeout_id)
|
||||
return;
|
||||
|
||||
#if DCHECK_IS_ON()
|
||||
// This method should never be called for a PDF renderer.
|
||||
content::RenderProcessHost* process =
|
||||
content::RenderProcessHost::FromID(global_id.child_id);
|
||||
DCHECK(!process || !process->IsPdf());
|
||||
#endif
|
||||
|
||||
LOG(ERROR) << "Timeout of new browser info response for frame "
|
||||
<< frame_util::GetFrameDebugString(global_id);
|
||||
|
||||
|
Reference in New Issue
Block a user