Commit 66add30d authored by Yoichi Osato's avatar Yoichi Osato Committed by Commit Bot

Revert "PlzWorker: Teach a precreated AppCacheHost's ID to SharedWorkerWebApplicationCacheHostImpl"

This reverts commit c00da2be.

Reason for revert: Compile failed on linux x64
https://ci.chromium.org/p/chromium/builders/luci.chromium.ci/Linux%20x64/70577

Original change's description:
> PlzWorker: Teach a precreated AppCacheHost's ID to SharedWorkerWebApplicationCacheHostImpl
> 
> On PlzWorker, AppCacheHost is created before starting worker script loading from
> a renderer process. This CL teaches the precreated AppCacheHost's ID from the
> browser process to the renderer process in order to associate worker script
> loading with the host.
> 
> This fixes DCHECK failures on appcache-worker.https.html caused by host
> mismatch, the test still times out though.
> 
> DesignDoc:
> https://docs.google.com/document/d/1Jtn33bvqkqWxq6K7HIA4uU6HLWPTmOD7vFviacfTmhM/edit?usp=sharing
> 
> Bug: 715632
> Cq-Include-Trybots: luci.chromium.try:linux_mojo
> Change-Id: I16c17447bbb0f4b154c5a7e9393afdea2d0e29d6
> Reviewed-on: https://chromium-review.googlesource.com/1150941
> Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org>
> Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
> Reviewed-by: Matt Falkenhagen <falken@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#578547}

TBR=falken@chromium.org,kinuko@chromium.org,nhiroki@chromium.org

Change-Id: I2911bb7adaf8ac6be3dde96e5908a0e80e7ebc2e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 715632
Cq-Include-Trybots: luci.chromium.try:linux_mojo
Reviewed-on: https://chromium-review.googlesource.com/1152590Reviewed-by: default avatarYoichi Osato <yoichio@chromium.org>
Commit-Queue: Yoichi Osato <yoichio@chromium.org>
Cr-Commit-Position: refs/heads/master@{#578548}
parent c00da2be
......@@ -102,7 +102,6 @@ void MockSharedWorkerFactory::CreateSharedWorker(
blink::mojom::WorkerContentSettingsProxyPtr content_settings,
mojom::ServiceWorkerProviderInfoForSharedWorkerPtr
service_worker_provider_info,
int appcache_host_id,
network::mojom::URLLoaderFactoryAssociatedPtrInfo
script_loader_factory_ptr_info,
std::unique_ptr<URLLoaderFactoryBundleInfo> subresource_loaders,
......
......@@ -71,7 +71,6 @@ class MockSharedWorkerFactory : public mojom::SharedWorkerFactory {
blink::mojom::WorkerContentSettingsProxyPtr content_settings,
mojom::ServiceWorkerProviderInfoForSharedWorkerPtr
service_worker_provider_info,
int appcache_host_id,
network::mojom::URLLoaderFactoryAssociatedPtrInfo
script_loader_factory_ptr_info,
std::unique_ptr<URLLoaderFactoryBundleInfo> subresource_loaders,
......
......@@ -190,11 +190,8 @@ void SharedWorkerHost::Start(
factory_->CreateSharedWorker(
std::move(info), pause_on_start, devtools_worker_token,
renderer_preferences, std::move(content_settings),
std::move(service_worker_provider_info),
appcache_handle_ ? appcache_handle_->appcache_host_id()
: kAppCacheNoHostId,
std::move(script_loader_factory), std::move(factory_bundle),
std::move(host), std::move(worker_request_),
std::move(service_worker_provider_info), std::move(script_loader_factory),
std::move(factory_bundle), std::move(host), std::move(worker_request_),
std::move(interface_provider));
// Monitor the lifetime of the worker.
......
......@@ -36,17 +36,11 @@ interface SharedWorkerFactory {
blink.mojom.WorkerContentSettingsProxy content_settings,
// S13nServiceWorker:
// The info about the service worker host in the browser process that
// provides support for this shared worker to be a service worker client.
// Null when S13nServiceWorker is disabled.
// The info about the host in the browser process that provides support
// for this shared worker to be a service worker client. Null when
// S13nServiceWorker is disabled.
ServiceWorkerProviderInfoForSharedWorker? service_worker_provider_info,
// NetworkService:
// The ID of the AppCacheHost in the browser process that serves resources
// for this shared worker. This is kAppCacheNoHostId when NetworkService
// is disabled or AppCache doesn't serve resources for this shared worker.
int32 appcache_host_id,
// S13nServiceWorker:
// The URLLoaderFactory to use to request the shared worker's script
// (just the main script resource; importScripts() should go through the
......
......@@ -53,12 +53,11 @@ class SharedWorkerWebApplicationCacheHostImpl
: public WebApplicationCacheHostImpl {
public:
SharedWorkerWebApplicationCacheHostImpl(
blink::WebApplicationCacheHostClient* client,
int appcache_host_id)
blink::WebApplicationCacheHostClient* client)
: WebApplicationCacheHostImpl(
client,
RenderThreadImpl::current()->appcache_dispatcher()->backend_proxy(),
appcache_host_id) {}
kAppCacheNoHostId) {}
// Main resource loading is different for workers. The main resource is
// loaded by the worker using WorkerClassicScriptLoader.
......@@ -200,7 +199,6 @@ EmbeddedSharedWorkerStub::EmbeddedSharedWorkerStub(
blink::mojom::WorkerContentSettingsProxyPtr content_settings,
mojom::ServiceWorkerProviderInfoForSharedWorkerPtr
service_worker_provider_info,
int appcache_host_id,
network::mojom::URLLoaderFactoryAssociatedPtrInfo
script_loader_factory_info,
std::unique_ptr<URLLoaderFactoryBundleInfo> subresource_loaders,
......@@ -211,13 +209,7 @@ EmbeddedSharedWorkerStub::EmbeddedSharedWorkerStub(
host_(std::move(host)),
name_(info->name),
url_(info->url),
renderer_preferences_(renderer_preferences),
appcache_host_id_(appcache_host_id) {
// The ID of the precreated AppCacheHost can be valid only when the
// NetworkService is enabled.
DCHECK(base::FeatureList::IsEnabled(network::features::kNetworkService) ||
appcache_host_id == kAppCacheNoHostId);
renderer_preferences_(renderer_preferences) {
impl_ = blink::WebSharedWorker::Create(this);
if (pause_on_start) {
// Pause worker context when it starts and wait until either DevTools client
......@@ -322,8 +314,7 @@ std::unique_ptr<blink::WebApplicationCacheHost>
EmbeddedSharedWorkerStub::CreateApplicationCacheHost(
blink::WebApplicationCacheHostClient* client) {
std::unique_ptr<WebApplicationCacheHostImpl> host =
std::make_unique<SharedWorkerWebApplicationCacheHostImpl>(
client, appcache_host_id_);
std::make_unique<SharedWorkerWebApplicationCacheHostImpl>(client);
app_cache_host_ = host.get();
return std::move(host);
}
......
......@@ -64,7 +64,6 @@ class EmbeddedSharedWorkerStub : public blink::WebSharedWorkerClient,
blink::mojom::WorkerContentSettingsProxyPtr content_settings,
mojom::ServiceWorkerProviderInfoForSharedWorkerPtr
service_worker_provider_info,
int appcache_host_id,
network::mojom::URLLoaderFactoryAssociatedPtrInfo
script_loader_factory_info,
std::unique_ptr<URLLoaderFactoryBundleInfo> subresource_loaders,
......@@ -117,7 +116,6 @@ class EmbeddedSharedWorkerStub : public blink::WebSharedWorkerClient,
std::vector<PendingChannel> pending_channels_;
ScopedChildProcessReference process_ref_;
const int appcache_host_id_;
WebApplicationCacheHostImpl* app_cache_host_ = nullptr; // Not owned.
// S13nServiceWorker: The info needed to connect to the
......
......@@ -28,7 +28,6 @@ void SharedWorkerFactoryImpl::CreateSharedWorker(
blink::mojom::WorkerContentSettingsProxyPtr content_settings,
mojom::ServiceWorkerProviderInfoForSharedWorkerPtr
service_worker_provider_info,
int appcache_host_id,
network::mojom::URLLoaderFactoryAssociatedPtrInfo
script_loader_factory_ptr_info,
std::unique_ptr<URLLoaderFactoryBundleInfo> subresource_loaders,
......@@ -39,7 +38,7 @@ void SharedWorkerFactoryImpl::CreateSharedWorker(
new EmbeddedSharedWorkerStub(
std::move(info), pause_on_start, devtools_worker_token,
renderer_preferences, std::move(content_settings),
std::move(service_worker_provider_info), appcache_host_id,
std::move(service_worker_provider_info),
std::move(script_loader_factory_ptr_info), std::move(subresource_loaders),
std::move(host), std::move(request), std::move(interface_provider));
}
......
......@@ -29,7 +29,6 @@ class SharedWorkerFactoryImpl : public mojom::SharedWorkerFactory {
blink::mojom::WorkerContentSettingsProxyPtr content_settings,
mojom::ServiceWorkerProviderInfoForSharedWorkerPtr
service_worker_provider_info,
int appcache_host_id,
network::mojom::URLLoaderFactoryAssociatedPtrInfo
script_loader_factory_ptr_info,
std::unique_ptr<URLLoaderFactoryBundleInfo> subresource_loaders,
......
......@@ -4,7 +4,7 @@
Bug(none) external/wpt/clear-site-data/storage.https.html [ Failure ]
Bug(none) external/wpt/clear-site-data/navigation.https.html [ Timeout ]
Bug(none) external/wpt/html/browsers/offline/appcache/workers/appcache-worker.html [ Timeout ]
crbug.com/829417 external/wpt/html/browsers/offline/appcache/workers/appcache-worker.https.html [ Timeout ]
crbug.com/829417 external/wpt/html/browsers/offline/appcache/workers/appcache-worker.https.html [ Crash Timeout ]
crbug.com/771118 external/wpt/service-workers/service-worker/mime-sniffing.https.html [ Failure ]
Bug(none) http/tests/misc/redirect-to-about-blank.html [ Timeout ]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment