Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(500)

Unified Diff: third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp

Issue 2878933003: Makes WorkerInspectorProxy work with ExecutionContext instead of Document (Closed)
Patch Set: . Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp b/third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp
index b6358692fa2b5d1f3b5337391baf1b337f8ae388..4241c9eb85fe4d4692ae8651d4708d4146d7bfec 100644
--- a/third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp
+++ b/third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp
@@ -315,10 +315,10 @@ void WebSharedWorkerImpl::OnScriptLoaderFinished() {
return;
}
- Document* document = main_frame_->GetFrame()->GetDocument();
- // FIXME: this document's origin is pristine and without any extra privileges.
- // (crbug.com/254993)
- SecurityOrigin* starter_origin = document->GetSecurityOrigin();
+ // FIXME: this document's origin is pristine and without any extra privileges
+ // (e.g. GrantUniversalAccess) that can be overriden in regular documents
+ // via WebPreference by embedders. (crbug.com/254993)
+ SecurityOrigin* starter_origin = loading_document_->GetSecurityOrigin();
WorkerClients* worker_clients = WorkerClients::Create();
ProvideLocalFileSystemToWorker(worker_clients,
@@ -347,9 +347,9 @@ void WebSharedWorkerImpl::OnScriptLoaderFinished() {
ContentSecurityPolicy* content_security_policy =
main_script_loader_->ReleaseContentSecurityPolicy();
WorkerThreadStartMode start_mode =
- worker_inspector_proxy_->WorkerStartMode(document);
- std::unique_ptr<WorkerSettings> worker_settings =
- WTF::WrapUnique(new WorkerSettings(document->GetSettings()));
+ worker_inspector_proxy_->WorkerStartMode(loading_document_);
+ std::unique_ptr<WorkerSettings> worker_settings = WTF::WrapUnique(
+ new WorkerSettings(main_frame_->GetFrame()->GetSettings()));
WorkerV8Settings worker_v8_settings = WorkerV8Settings::Default();
worker_v8_settings.atomics_wait_mode_ =
WorkerV8Settings::AtomicsWaitMode::kAllow;

Powered by Google App Engine
This is Rietveld 408576698