refactor: avoid deprecated v8::Context::GetIsolate() calls pt 3 context get isolate pt 3 (#47901)

* 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()
This commit is contained in:
Charles Kerr 2025-07-30 09:14:38 -05:00 committed by GitHub
commit 63c452dcc7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 73 additions and 55 deletions

View file

@ -117,7 +117,7 @@ void Initialize(v8::Local<v8::Object> exports,
v8::Local<v8::Value> unused,
v8::Local<v8::Context> context,
void* priv) {
v8::Isolate* isolate = context->GetIsolate();
v8::Isolate* const isolate = v8::Isolate::GetCurrent();
gin_helper::Dictionary dict(isolate, exports);
dict.Set("apiName", electron::api::ApiName::Create(isolate));
}