chore: use v8::Local<>, not v8::Handle<> (#43036)
v8::Handle is an alias for v8::Local that "is kept around for historical reasons" and is disabled when V8_IMMINENT_DEPRECATION_WARNING is defined Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Charles Kerr <charles@charleskerr.com>
This commit is contained in:
parent
0a3ec0899d
commit
d9de48e9c1
15 changed files with 34 additions and 34 deletions
|
@ -81,7 +81,7 @@ void ElectronRenderFrameObserver::DidClearWindowObject() {
|
|||
!web_frame->IsOnInitialEmptyDocument()) {
|
||||
v8::Isolate* isolate = web_frame->GetAgentGroupScheduler()->Isolate();
|
||||
v8::HandleScope handle_scope{isolate};
|
||||
v8::Handle<v8::Context> context = web_frame->MainWorldScriptContext();
|
||||
v8::Local<v8::Context> context = web_frame->MainWorldScriptContext();
|
||||
v8::MicrotasksScope microtasks_scope(
|
||||
isolate, context->GetMicrotaskQueue(),
|
||||
v8::MicrotasksScope::kDoNotRunMicrotasks);
|
||||
|
@ -94,7 +94,7 @@ void ElectronRenderFrameObserver::DidClearWindowObject() {
|
|||
}
|
||||
|
||||
void ElectronRenderFrameObserver::DidInstallConditionalFeatures(
|
||||
v8::Handle<v8::Context> context,
|
||||
v8::Local<v8::Context> context,
|
||||
int world_id) {
|
||||
// When a child window is created with window.open, its WebPreferences will
|
||||
// be copied from its parent, and Chromium will initialize JS context in it
|
||||
|
|
|
@ -29,7 +29,7 @@ class ElectronRenderFrameObserver : private content::RenderFrameObserver {
|
|||
private:
|
||||
// content::RenderFrameObserver:
|
||||
void DidClearWindowObject() override;
|
||||
void DidInstallConditionalFeatures(v8::Handle<v8::Context> context,
|
||||
void DidInstallConditionalFeatures(v8::Local<v8::Context> context,
|
||||
int world_id) override;
|
||||
void WillReleaseScriptContext(v8::Local<v8::Context> context,
|
||||
int world_id) override;
|
||||
|
|
|
@ -72,7 +72,7 @@ void ElectronRendererClient::UndeferLoad(content::RenderFrame* render_frame) {
|
|||
}
|
||||
|
||||
void ElectronRendererClient::DidCreateScriptContext(
|
||||
v8::Handle<v8::Context> renderer_context,
|
||||
v8::Local<v8::Context> renderer_context,
|
||||
content::RenderFrame* render_frame) {
|
||||
// TODO(zcbenz): Do not create Node environment if node integration is not
|
||||
// enabled.
|
||||
|
@ -158,7 +158,7 @@ void ElectronRendererClient::DidCreateScriptContext(
|
|||
}
|
||||
|
||||
void ElectronRendererClient::WillReleaseScriptContext(
|
||||
v8::Handle<v8::Context> context,
|
||||
v8::Local<v8::Context> context,
|
||||
content::RenderFrame* render_frame) {
|
||||
if (injected_frames_.erase(render_frame) == 0)
|
||||
return;
|
||||
|
|
|
@ -29,9 +29,9 @@ class ElectronRendererClient : public RendererClientBase {
|
|||
ElectronRendererClient& operator=(const ElectronRendererClient&) = delete;
|
||||
|
||||
// electron::RendererClientBase:
|
||||
void DidCreateScriptContext(v8::Handle<v8::Context> context,
|
||||
void DidCreateScriptContext(v8::Local<v8::Context> context,
|
||||
content::RenderFrame* render_frame) override;
|
||||
void WillReleaseScriptContext(v8::Handle<v8::Context> context,
|
||||
void WillReleaseScriptContext(v8::Local<v8::Context> context,
|
||||
content::RenderFrame* render_frame) override;
|
||||
|
||||
private:
|
||||
|
|
|
@ -98,7 +98,7 @@ double Uptime() {
|
|||
.InSecondsF();
|
||||
}
|
||||
|
||||
void InvokeEmitProcessEvent(v8::Handle<v8::Context> context,
|
||||
void InvokeEmitProcessEvent(v8::Local<v8::Context> context,
|
||||
const std::string& event_name) {
|
||||
auto* isolate = context->GetIsolate();
|
||||
// set by sandboxed_renderer/init.js
|
||||
|
@ -170,7 +170,7 @@ void ElectronSandboxedRendererClient::RunScriptsAtDocumentEnd(
|
|||
}
|
||||
|
||||
void ElectronSandboxedRendererClient::DidCreateScriptContext(
|
||||
v8::Handle<v8::Context> context,
|
||||
v8::Local<v8::Context> context,
|
||||
content::RenderFrame* render_frame) {
|
||||
// Only allow preload for the main frame or
|
||||
// For devtools we still want to run the preload_bundle script
|
||||
|
@ -201,7 +201,7 @@ void ElectronSandboxedRendererClient::DidCreateScriptContext(
|
|||
}
|
||||
|
||||
void ElectronSandboxedRendererClient::WillReleaseScriptContext(
|
||||
v8::Handle<v8::Context> context,
|
||||
v8::Local<v8::Context> context,
|
||||
content::RenderFrame* render_frame) {
|
||||
if (injected_frames_.erase(render_frame) == 0)
|
||||
return;
|
||||
|
|
|
@ -34,9 +34,9 @@ class ElectronSandboxedRendererClient : public RendererClientBase {
|
|||
v8::Local<v8::Context> context,
|
||||
content::RenderFrame* render_frame);
|
||||
// electron::RendererClientBase:
|
||||
void DidCreateScriptContext(v8::Handle<v8::Context> context,
|
||||
void DidCreateScriptContext(v8::Local<v8::Context> context,
|
||||
content::RenderFrame* render_frame) override;
|
||||
void WillReleaseScriptContext(v8::Handle<v8::Context> context,
|
||||
void WillReleaseScriptContext(v8::Local<v8::Context> context,
|
||||
content::RenderFrame* render_frame) override;
|
||||
// content::ContentRendererClient:
|
||||
void RenderFrameCreated(content::RenderFrame*) override;
|
||||
|
|
|
@ -214,7 +214,7 @@ void RendererClientBase::BindProcess(v8::Isolate* isolate,
|
|||
}
|
||||
|
||||
bool RendererClientBase::ShouldLoadPreload(
|
||||
v8::Handle<v8::Context> context,
|
||||
v8::Local<v8::Context> context,
|
||||
content::RenderFrame* render_frame) const {
|
||||
auto prefs = render_frame->GetBlinkPreferences();
|
||||
bool is_main_frame = render_frame->IsMainFrame();
|
||||
|
@ -580,7 +580,7 @@ extensions::ExtensionsClient* RendererClientBase::CreateExtensionsClient() {
|
|||
#endif
|
||||
|
||||
bool RendererClientBase::IsWebViewFrame(
|
||||
v8::Handle<v8::Context> context,
|
||||
v8::Local<v8::Context> context,
|
||||
content::RenderFrame* render_frame) const {
|
||||
auto* isolate = context->GetIsolate();
|
||||
|
||||
|
@ -601,7 +601,7 @@ bool RendererClientBase::IsWebViewFrame(
|
|||
}
|
||||
|
||||
void RendererClientBase::SetupMainWorldOverrides(
|
||||
v8::Handle<v8::Context> context,
|
||||
v8::Local<v8::Context> context,
|
||||
content::RenderFrame* render_frame) {
|
||||
auto prefs = render_frame->GetBlinkPreferences();
|
||||
// We only need to run the isolated bundle if webview is enabled
|
||||
|
|
|
@ -61,12 +61,12 @@ class RendererClientBase : public content::ContentRendererClient
|
|||
mojo::ScopedMessagePipeHandle interface_pipe) override;
|
||||
#endif
|
||||
|
||||
virtual void DidCreateScriptContext(v8::Handle<v8::Context> context,
|
||||
virtual void DidCreateScriptContext(v8::Local<v8::Context> context,
|
||||
content::RenderFrame* render_frame) = 0;
|
||||
virtual void WillReleaseScriptContext(v8::Handle<v8::Context> context,
|
||||
virtual void WillReleaseScriptContext(v8::Local<v8::Context> context,
|
||||
content::RenderFrame* render_frame) = 0;
|
||||
virtual void DidClearWindowObject(content::RenderFrame* render_frame);
|
||||
virtual void SetupMainWorldOverrides(v8::Handle<v8::Context> context,
|
||||
virtual void SetupMainWorldOverrides(v8::Local<v8::Context> context,
|
||||
content::RenderFrame* render_frame);
|
||||
|
||||
std::unique_ptr<blink::WebPrescientNetworking> CreatePrescientNetworking(
|
||||
|
@ -81,7 +81,7 @@ class RendererClientBase : public content::ContentRendererClient
|
|||
v8::Local<v8::Object> context,
|
||||
v8::Local<v8::Function> register_cb);
|
||||
|
||||
bool IsWebViewFrame(v8::Handle<v8::Context> context,
|
||||
bool IsWebViewFrame(v8::Local<v8::Context> context,
|
||||
content::RenderFrame* render_frame) const;
|
||||
|
||||
#if BUILDFLAG(ENABLE_BUILTIN_SPELLCHECKER)
|
||||
|
@ -93,7 +93,7 @@ class RendererClientBase : public content::ContentRendererClient
|
|||
gin_helper::Dictionary* process,
|
||||
content::RenderFrame* render_frame);
|
||||
|
||||
bool ShouldLoadPreload(v8::Handle<v8::Context> context,
|
||||
bool ShouldLoadPreload(v8::Local<v8::Context> context,
|
||||
content::RenderFrame* render_frame) const;
|
||||
|
||||
// content::ContentRendererClient:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue