
* refactor: add a v8::Isolate* arg to RendererClientBase::IsWebViewFrame() Needed for creating gin dictionaries refactor: add a v8::Isolate* arg to ShouldLoadPreload() Needed for calling IsWebViewFrame() * refactor: add a v8::Isolate* arg to electron::util::CompileAndCall() * refactor: add a v8::Isolate* arg to OnCreatePreloadableV8Context() * refactor: add a v8::Isolate* arg to InvokeEmitProcessEvent() * refactor: add a v8::Isolate* arg to ServiceWorkerData's constructor * refactor: add a v8::Isolate* arg to RendererClientBase::SetupMainWorldOverrides() * refactor: add a v8::Isolate* arg to RendererClientBase::WilLReleaseScriptContext() * docs: update docs to avoid v8::Context::GetIsolate() * refactor: add a v8::Isolate* arg to ElectronSandboxedRendererClient::InitializeBindings() * refactor: avoid v8::Context::GetIsolate() call in PromiseBase::SettleScope::~SettleScope()
35 lines
1.1 KiB
C++
35 lines
1.1 KiB
C++
// Copyright (c) 2025 Salesforce, Inc.
|
|
// Use of this source code is governed by the MIT license that can be
|
|
// found in the LICENSE file.
|
|
|
|
#ifndef ELECTRON_SHELL_RENDERER_PRELOAD_REALM_CONTEXT_H_
|
|
#define ELECTRON_SHELL_RENDERER_PRELOAD_REALM_CONTEXT_H_
|
|
|
|
#include "v8/include/v8-forward.h"
|
|
|
|
namespace electron {
|
|
class ServiceWorkerData;
|
|
}
|
|
|
|
namespace electron::preload_realm {
|
|
|
|
// Get initiator context given the preload context.
|
|
v8::MaybeLocal<v8::Context> GetInitiatorContext(v8::Local<v8::Context> context);
|
|
|
|
// Get the preload context given the initiator context.
|
|
v8::MaybeLocal<v8::Context> GetPreloadRealmContext(
|
|
v8::Local<v8::Context> context);
|
|
|
|
// Get service worker data given the preload realm context.
|
|
electron::ServiceWorkerData* GetServiceWorkerData(
|
|
v8::Local<v8::Context> context);
|
|
|
|
// Create
|
|
void OnCreatePreloadableV8Context(
|
|
v8::Isolate* const isolate,
|
|
v8::Local<v8::Context> initiator_context,
|
|
electron::ServiceWorkerData* service_worker_data);
|
|
|
|
} // namespace electron::preload_realm
|
|
|
|
#endif // ELECTRON_SHELL_RENDERER_PRELOAD_REALM_CONTEXT_H_
|