Update to Chromium version 82.0.4085.0 (#749737)

- Building on macOS now requires the 10.15 SDK. Xcode 11.3 is recommended as
  Xcode 11.4 is not currently supported (see https://crbug.com/1065146).
- Jumbo build configuration is no longer supported.

Chromium is skipping the M82 release and consequently no CEF 4085 branch will
be created. For details on the Chromium decision see
https://groups.google.com/a/chromium.org/d/msg/chromium-dev/Vn7uzglqLz0/JItlSrZxBAAJ
This commit is contained in:
Marshall Greenblatt
2020-03-30 16:13:42 -04:00
parent 3d87a68561
commit 047e8f9349
99 changed files with 839 additions and 3199 deletions

View File

@@ -152,7 +152,8 @@ v8::MaybeLocal<v8::Value> CallV8Function(v8::Local<v8::Context> context,
if (frame &&
frame->GetDocument()->CanExecuteScripts(blink::kAboutToExecuteScript)) {
func_rv = blink::V8ScriptRunner::CallFunction(
function, frame->GetDocument(), receiver, argc, args, isolate);
function, frame->GetDocument()->ToExecutionContext(), receiver, argc,
args, isolate);
}
return func_rv;

View File

@@ -95,7 +95,6 @@
#include "third_party/blink/public/platform/platform.h"
#include "third_party/blink/public/platform/scheduler/web_renderer_process_type.h"
#include "third_party/blink/public/platform/url_conversion.h"
#include "third_party/blink/public/platform/web_prerendering_support.h"
#include "third_party/blink/public/platform/web_runtime_features.h"
#include "third_party/blink/public/platform/web_string.h"
#include "third_party/blink/public/platform/web_url.h"
@@ -115,15 +114,6 @@
namespace {
// Stub implementation of blink::WebPrerenderingSupport.
class CefPrerenderingSupport : public blink::WebPrerenderingSupport {
private:
void Add(const blink::WebPrerender& prerender) override {}
void Cancel(const blink::WebPrerender& prerender) override {}
void Abandon(const blink::WebPrerender& prerender) override {}
void PrefetchFinished() override {}
};
// Stub implementation of blink::WebPrerendererClient.
class CefPrerendererClient : public content::RenderViewObserver,
public blink::WebPrerendererClient {
@@ -141,7 +131,6 @@ class CefPrerendererClient : public content::RenderViewObserver,
void OnDestruct() override { delete this; }
// WebPrerendererClient methods:
void WillAddPrerender(blink::WebPrerender* prerender) override {}
bool IsPrefetchOnly() override { return false; }
};
@@ -404,8 +393,6 @@ void CefContentRendererClient::RenderThreadStarted() {
base::MessageLoopCurrent::Get()->AddDestructionObserver(this);
}
blink::WebPrerenderingSupport::Initialize(new CefPrerenderingSupport());
#if defined(OS_MACOSX)
{
base::ScopedCFTypeRef<CFStringRef> key(

View File

@@ -84,12 +84,6 @@ void CefRenderThreadObserver::SetConfiguration(
void CefRenderThreadObserver::SetContentSettingRules(
const RendererContentSettingRules& rules) {}
void CefRenderThreadObserver::SetFieldTrialGroup(
const std::string& trial_name,
const std::string& group_name) {
content::RenderThread::Get()->SetFieldTrialGroup(trial_name, group_name);
}
void CefRenderThreadObserver::OnRendererConfigurationAssociatedRequest(
mojo::PendingAssociatedReceiver<chrome::mojom::RendererConfiguration>
receiver) {

View File

@@ -46,8 +46,6 @@ class CefRenderThreadObserver : public content::RenderThreadObserver,
void SetConfiguration(chrome::mojom::DynamicParamsPtr params) override;
void SetContentSettingRules(
const RendererContentSettingRules& rules) override;
void SetFieldTrialGroup(const std::string& trial_name,
const std::string& group_name) override;
void OnRendererConfigurationAssociatedRequest(
mojo::PendingAssociatedReceiver<chrome::mojom::RendererConfiguration>

View File

@@ -14,6 +14,8 @@
#include "base/logging.h"
#include "base/message_loop/message_loop.h"
#include "net/base/request_priority.h"
#include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom.h"
#include "third_party/blink/public/platform/web_security_origin.h"
#include "third_party/blink/public/platform/web_string.h"
#include "third_party/blink/public/platform/web_url.h"
@@ -110,15 +112,35 @@ class CefRenderURLRequest::Context
url_client_.reset(new CefWebURLLoaderClient(this, request_->GetFlags()));
WebURLRequest urlRequest;
std::unique_ptr<network::ResourceRequest> resource_request =
std::make_unique<network::ResourceRequest>();
static_cast<CefRequestImpl*>(request_.get())
->Get(urlRequest, upload_data_size_);
urlRequest.SetPriority(blink::WebURLRequest::Priority::kMedium);
->Get(resource_request.get(), false);
resource_request->priority = net::MEDIUM;
// Behave the same as a subresource load.
resource_request->fetch_request_context_type =
static_cast<int>(blink::mojom::RequestContextType::SUBRESOURCE);
resource_request->resource_type =
static_cast<int>(blink::mojom::ResourceType::kSubResource);
// Need load timing info for WebURLLoaderImpl::PopulateURLResponse to
// properly set cached status.
resource_request->enable_load_timing = true;
// Set the origin to match the request. The requirement for an origin is
// DCHECK'd in ResourceDispatcherHostImpl::ContinuePendingBeginRequest.
urlRequest.SetRequestorOrigin(
blink::WebSecurityOrigin::Create(urlRequest.Url()));
resource_request->request_initiator = url::Origin::Create(url);
if (resource_request->request_body) {
const auto& elements = *resource_request->request_body->elements();
if (elements.size() > 0) {
const auto& element = elements[0];
if (element.type() == network::mojom::DataElementType::kBytes) {
upload_data_size_ = element.length() - element.offset();
}
}
}
blink::WebURLLoaderFactory* factory = nullptr;
if (frame_) {
@@ -131,9 +153,13 @@ class CefRenderURLRequest::Context
}
loader_ = factory->CreateURLLoader(
urlRequest, blink::scheduler::WebResourceLoadingTaskRunnerHandle::
CreateUnprioritized(task_runner_.get()));
loader_->LoadAsynchronously(urlRequest, url_client_.get());
blink::WebURLRequest(),
blink::scheduler::WebResourceLoadingTaskRunnerHandle::
CreateUnprioritized(task_runner_.get()));
loader_->LoadAsynchronously(
std::move(resource_request), nullptr /* extra_data */,
0 /* requestor_id */, false /* download_to_network_cache_only */,
false /* no_mime_sniffing */, url_client_.get());
return true;
}
@@ -316,8 +342,7 @@ class CefRenderURLRequest::Context
// Upload notifications are sent using a timer and may not occur if the
// request completes too quickly. We therefore send the notification here
// if necessary.
client_->OnUploadProgress(url_request_.get(), upload_data_size_,
upload_data_size_);
url_client_->DidSendData(upload_data_size_, upload_data_size_);
got_upload_progress_complete_ = true;
}
}

View File

@@ -15,6 +15,7 @@
#include "content/public/renderer/render_frame.h"
#include "extensions/renderer/guest_view/mime_handler_view/mime_handler_view_container.h"
#include "services/network/public/cpp/features.h"
#include "third_party/blink/public/common/loader/resource_type_util.h"
#include "third_party/blink/public/platform/web_url.h"
CefURLLoaderThrottleProviderImpl::CefURLLoaderThrottleProviderImpl(
@@ -42,22 +43,25 @@ CefURLLoaderThrottleProviderImpl::Clone() {
std::vector<std::unique_ptr<blink::URLLoaderThrottle>>
CefURLLoaderThrottleProviderImpl::CreateThrottles(
int render_frame_id,
const blink::WebURLRequest& request,
content::ResourceType resource_type) {
const blink::WebURLRequest& request) {
DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
std::vector<std::unique_ptr<blink::URLLoaderThrottle>> throttles;
const network::mojom::RequestDestination request_destination =
request.GetRequestDestination();
// Some throttles have already been added in the browser for frame resources.
// Don't add them for frame requests.
bool is_frame_resource = content::IsResourceTypeFrame(resource_type);
bool is_frame_resource =
blink::IsRequestDestinationFrame(request_destination);
DCHECK(!is_frame_resource ||
type_ == content::URLLoaderThrottleProviderType::kFrame);
if (extensions::ExtensionsEnabled() &&
type_ == content::URLLoaderThrottleProviderType::kFrame &&
resource_type == content::ResourceType::kObject) {
request_destination == network::mojom::RequestDestination::kObject) {
content::RenderFrame* render_frame =
content::RenderFrame::FromRoutingID(render_frame_id);
auto mime_handlers =
@@ -73,7 +77,6 @@ CefURLLoaderThrottleProviderImpl::CreateThrottles(
}
throttles.push_back(std::make_unique<GoogleURLLoaderThrottle>(
CefRenderThreadObserver::is_incognito_process(),
CefRenderThreadObserver::GetDynamicParams()));
return throttles;

View File

@@ -25,8 +25,7 @@ class CefURLLoaderThrottleProviderImpl
std::unique_ptr<content::URLLoaderThrottleProvider> Clone() override;
std::vector<std::unique_ptr<blink::URLLoaderThrottle>> CreateThrottles(
int render_frame_id,
const blink::WebURLRequest& request,
content::ResourceType resource_type) override;
const blink::WebURLRequest& request) override;
void SetOnline(bool is_online) override;
private: