From 6824387c8de7c5024eaf2ee81b10f7f1d8eb40d9 Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Thu, 3 Dec 2015 13:41:40 -0500 Subject: [PATCH] Allow blank URL when creating popup windows (issue #1289) --- libcef/browser/browser_info_manager.cc | 2 -- libcef/browser/browser_info_manager.h | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libcef/browser/browser_info_manager.cc b/libcef/browser/browser_info_manager.cc index 6756a8e3c..60037212d 100644 --- a/libcef/browser/browser_info_manager.cc +++ b/libcef/browser/browser_info_manager.cc @@ -139,7 +139,6 @@ void CefBrowserInfoManager::OnCreateWindow( const ViewHostMsg_CreateWindow_Params& params) { DCHECK_GT(params.opener_id, 0); DCHECK_GT(params.opener_render_frame_id, 0); - DCHECK(!params.target_url.is_empty()); scoped_ptr pending_popup( new CefBrowserInfoManager::PendingPopup); @@ -465,7 +464,6 @@ scoped_ptr const GURL& target_url) { DCHECK_GT(opener_process_id, 0); DCHECK_GT(opener_view_id, 0); - DCHECK(!target_url.is_empty()); base::AutoLock lock_scope(pending_popup_lock_); diff --git a/libcef/browser/browser_info_manager.h b/libcef/browser/browser_info_manager.h index f93bbbfa4..0556ec890 100644 --- a/libcef/browser/browser_info_manager.h +++ b/libcef/browser/browser_info_manager.h @@ -159,6 +159,8 @@ class CefBrowserInfoManager : public content::RenderProcessHostObserver { } step; // Initial state from ViewHostMsg_CreateWindow. + // |target_url| will be empty if a popup is created via window.open() and + // never navigated. For example: javascript:window.open(); int opener_process_id; int opener_view_id; int64 opener_frame_id;