Fix Check failed: frame->IsMain() when loading Worker scripts (issue #2561)

This commit is contained in:
Marshall Greenblatt 2019-01-17 16:22:20 +01:00
parent 4b5c38eeb4
commit 10916749d6
1 changed files with 2 additions and 1 deletions

View File

@ -1648,7 +1648,8 @@ CefRefPtr<CefFrame> CefBrowserHostImpl::GetFrameForRequest(
// The value of |IsMainFrame| is unreliable in these cases.
const bool is_main_frame_state_flaky =
info->IsDownload() ||
info->GetResourceType() == content::RESOURCE_TYPE_XHR;
info->GetResourceType() == content::RESOURCE_TYPE_XHR ||
info->GetResourceType() == content::RESOURCE_TYPE_SCRIPT;
return GetOrCreateFrame(info->GetRenderFrameID(), info->GetFrameTreeNodeId(),
CefFrameHostImpl::kUnspecifiedFrameId,
info->IsMainFrame(), is_main_frame_state_flaky,