mirror of
https://github.com/electron/electron.git
synced 2026-01-07 22:54:25 -05:00
Reland "extensions: Add WillPrepareForEvaluation to setup MojoJS"
https://chromium-review.googlesource.com/c/chromium/src/+/6630056
This commit is contained in:
committed by
Charles Kerr
parent
9cfb73d7ac
commit
77c4f967a6
@@ -170,14 +170,14 @@ void ElectronSandboxedRendererClient::EmitProcessEvent(
|
||||
InvokeEmitProcessEvent(context, event_name);
|
||||
}
|
||||
|
||||
void ElectronSandboxedRendererClient::WillEvaluateServiceWorkerOnWorkerThread(
|
||||
void ElectronSandboxedRendererClient::WillPrepareForEvaluationOnWorkerThread(
|
||||
blink::WebServiceWorkerContextProxy* context_proxy,
|
||||
v8::Local<v8::Context> v8_context,
|
||||
int64_t service_worker_version_id,
|
||||
const GURL& service_worker_scope,
|
||||
const GURL& script_url,
|
||||
const blink::ServiceWorkerToken& service_worker_token) {
|
||||
RendererClientBase::WillEvaluateServiceWorkerOnWorkerThread(
|
||||
RendererClientBase::WillPrepareForEvaluationOnWorkerThread(
|
||||
context_proxy, v8_context, service_worker_version_id,
|
||||
service_worker_scope, script_url, service_worker_token);
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ class ElectronSandboxedRendererClient : public RendererClientBase {
|
||||
void RenderFrameCreated(content::RenderFrame*) override;
|
||||
void RunScriptsAtDocumentStart(content::RenderFrame* render_frame) override;
|
||||
void RunScriptsAtDocumentEnd(content::RenderFrame* render_frame) override;
|
||||
void WillEvaluateServiceWorkerOnWorkerThread(
|
||||
void WillPrepareForEvaluationOnWorkerThread(
|
||||
blink::WebServiceWorkerContextProxy* context_proxy,
|
||||
v8::Local<v8::Context> v8_context,
|
||||
int64_t service_worker_version_id,
|
||||
|
||||
@@ -485,7 +485,7 @@ void RendererClientBase::DidInitializeServiceWorkerContextOnWorkerThread(
|
||||
#endif
|
||||
}
|
||||
|
||||
void RendererClientBase::WillEvaluateServiceWorkerOnWorkerThread(
|
||||
void RendererClientBase::WillPrepareForEvaluationOnWorkerThread(
|
||||
blink::WebServiceWorkerContextProxy* context_proxy,
|
||||
v8::Local<v8::Context> v8_context,
|
||||
int64_t service_worker_version_id,
|
||||
@@ -494,12 +494,19 @@ void RendererClientBase::WillEvaluateServiceWorkerOnWorkerThread(
|
||||
const blink::ServiceWorkerToken& service_worker_token) {
|
||||
#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
|
||||
extensions_renderer_client_->dispatcher()
|
||||
->WillEvaluateServiceWorkerOnWorkerThread(
|
||||
->WillPrepareForEvaluationOnWorkerThread(
|
||||
context_proxy, v8_context, service_worker_version_id,
|
||||
service_worker_scope, script_url, service_worker_token);
|
||||
#endif
|
||||
}
|
||||
|
||||
void RendererClientBase::WillEvaluateServiceWorkerOnWorkerThread() {
|
||||
#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
|
||||
extensions_renderer_client_->dispatcher()
|
||||
->WillEvaluateServiceWorkerOnWorkerThread();
|
||||
#endif
|
||||
}
|
||||
|
||||
void RendererClientBase::DidStartServiceWorkerContextOnWorkerThread(
|
||||
int64_t service_worker_version_id,
|
||||
const GURL& service_worker_scope,
|
||||
|
||||
@@ -117,13 +117,14 @@ class RendererClientBase : public content::ContentRendererClient
|
||||
blink::WebServiceWorkerContextProxy* context_proxy,
|
||||
const GURL& service_worker_scope,
|
||||
const GURL& script_url) override;
|
||||
void WillEvaluateServiceWorkerOnWorkerThread(
|
||||
void WillPrepareForEvaluationOnWorkerThread(
|
||||
blink::WebServiceWorkerContextProxy* context_proxy,
|
||||
v8::Local<v8::Context> v8_context,
|
||||
int64_t service_worker_version_id,
|
||||
const GURL& service_worker_scope,
|
||||
const GURL& script_url,
|
||||
const blink::ServiceWorkerToken& service_worker_token) override;
|
||||
void WillEvaluateServiceWorkerOnWorkerThread() override;
|
||||
void DidStartServiceWorkerContextOnWorkerThread(
|
||||
int64_t service_worker_version_id,
|
||||
const GURL& service_worker_scope,
|
||||
|
||||
Reference in New Issue
Block a user