mirror of
https://github.com/electron/electron.git
synced 2026-01-08 23:18:06 -05:00
chore: bump chromium to 144.0.7512.1 (main) (#48768)
* chore: bump chromium in DEPS to 144.0.7507.0
* chore: bump chromium in DEPS to 144.0.7508.0
* chore: update patches
* 7101838: [pathbuilder] Enforce immutable SkPath APIs globally
https://chromium-review.googlesource.com/c/chromium/src/+/7101838
* chore: update filenames.libcxx.gni
* [pathbuilder] Enforce immutable SkPath APIs globally
https://chromium-review.googlesource.com/c/chromium/src/+/7101838
* Reduce service_worker_info.h includes in headers
https://chromium-review.googlesource.com/c/chromium/src/+/7108401
* chore: bump chromium in DEPS to 144.0.7510.0
* chore: update patches
* Use internal popup menus for tabs in actor-controlled states
https://chromium-review.googlesource.com/c/chromium/src/+/7074751
* [api] Delete deprecated fields on v8::Isolate
https://chromium-review.googlesource.com/c/v8/v8/+/7081397
xref: 98d243aea0
* Fixup Reduce service_worker_info.h includes in headers
* Promote deprecation of v8::Context and v8::Object API methods
https://chromium-review.googlesource.com/c/v8/v8/+/7087956
* fixup Promote deprecation of v8::Context and v8::Object API methods
* chore: bump chromium in DEPS to 144.0.7512.1
* chore: update patches
* fixup [pathbuilder] Enforce immutable SkPath APIs global
* chore: update filenames.hunspell.gni
* fix deprecation of v8::Context and v8::Object API methods for nan
https://chromium-review.googlesource.com/c/v8/v8/+/7087956
* [PDF] Implement PdfHelpBubbleHandlerFactory
https://chromium-review.googlesource.com/c/chromium/src/+/7056325
also: [PDF Ink Signatures] Hook up IPH
https://chromium-review.googlesource.com/c/chromium/src/+/7056207
* Remove base/hash/md5.h
https://chromium-review.googlesource.com/c/chromium/src/+/7113738
* fixup for lint
* Remove deprecated interceptor callback types and AccessControl enum
https://chromium-review.googlesource.com/c/v8/v8/+/7112747
* fixup for lint
* fixup [PDF] Implement PdfHelpBubbleHandlerFactory
* use base::SHA1HashString instead of std::hash
---------
Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
This commit is contained in:
committed by
GitHub
parent
ca0b46b413
commit
595920a308
@@ -10,6 +10,7 @@
|
||||
#include "base/logging.h"
|
||||
#include "base/no_destructor.h"
|
||||
#include "content/browser/service_worker/service_worker_context_wrapper.h" // nogncheck
|
||||
#include "content/browser/service_worker/service_worker_info.h" // nogncheck
|
||||
#include "content/browser/service_worker/service_worker_version.h" // nogncheck
|
||||
#include "gin/object_template_builder.h"
|
||||
#include "services/service_manager/public/cpp/interface_provider.h"
|
||||
|
||||
@@ -2261,7 +2261,8 @@ void WebContents::WebContentsDestroyed() {
|
||||
v8::Local<v8::Object> wrapper;
|
||||
if (!GetWrapper(isolate).ToLocal(&wrapper))
|
||||
return;
|
||||
wrapper->SetAlignedPointerInInternalField(0, nullptr);
|
||||
wrapper->SetAlignedPointerInInternalField(0, nullptr,
|
||||
v8::kEmbedderDataTypeTagDefault);
|
||||
|
||||
// Tell WebViewGuestDelegate that the WebContents has been destroyed.
|
||||
if (guest_delegate_)
|
||||
|
||||
@@ -216,12 +216,14 @@
|
||||
|
||||
#if BUILDFLAG(ENABLE_PDF_VIEWER)
|
||||
#include "chrome/browser/pdf/chrome_pdf_stream_delegate.h"
|
||||
#include "chrome/browser/pdf/pdf_help_bubble_handler_factory.h"
|
||||
#include "chrome/browser/plugins/pdf_iframe_navigation_throttle.h" // nogncheck
|
||||
#include "components/pdf/browser/pdf_document_helper.h" // nogncheck
|
||||
#include "components/pdf/browser/pdf_navigation_throttle.h"
|
||||
#include "components/pdf/browser/pdf_url_loader_request_interceptor.h"
|
||||
#include "components/pdf/common/constants.h" // nogncheck
|
||||
#include "shell/browser/electron_pdf_document_helper_client.h"
|
||||
#include "ui/webui/resources/cr_components/help_bubble/help_bubble.mojom.h" // nogncheck
|
||||
#endif
|
||||
|
||||
using content::BrowserThread;
|
||||
@@ -1676,6 +1678,11 @@ void ElectronBrowserClient::RegisterBrowserInterfaceBindersForFrame(
|
||||
->RegisterBrowserInterfaceBindersForFrame(map, render_frame_host,
|
||||
extension);
|
||||
#endif
|
||||
|
||||
#if BUILDFLAG(ENABLE_PDF_VIEWER)
|
||||
map->Add<help_bubble::mojom::PdfHelpBubbleHandlerFactory>(
|
||||
&pdf::PdfHelpBubbleHandlerFactory::Create);
|
||||
#endif
|
||||
}
|
||||
|
||||
#if BUILDFLAG(IS_LINUX)
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include <vector>
|
||||
|
||||
#include "base/files/file_util.h"
|
||||
#include "base/hash/md5.h"
|
||||
#include "base/hash/sha1.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/strings/string_number_conversions.h"
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
@@ -68,7 +68,7 @@ std::wstring NotificationPresenterWin::SaveIconToFilesystem(
|
||||
|
||||
std::string filename;
|
||||
if (origin.is_valid()) {
|
||||
filename = base::MD5String(origin.spec()) + ".png";
|
||||
filename = base::SHA1HashString(origin.spec()) + ".png";
|
||||
} else {
|
||||
const int64_t now_usec = base::Time::Now().since_origin().InMicroseconds();
|
||||
filename = base::NumberToString(now_usec) + ".png";
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include "base/numerics/safe_conversions.h"
|
||||
#include "cc/paint/paint_flags.h"
|
||||
#include "third_party/skia/include/core/SkPath.h"
|
||||
#include "third_party/skia/include/core/SkPathBuilder.h"
|
||||
#include "ui/gfx/canvas.h"
|
||||
#include "ui/gfx/geometry/rrect_f.h"
|
||||
|
||||
@@ -75,11 +76,12 @@ void WinIconPainter::PaintCloseIcon(gfx::Canvas* canvas,
|
||||
paint_flags.setAntiAlias(true);
|
||||
|
||||
canvas->ClipRect(symbol_rect);
|
||||
SkPath path;
|
||||
path.moveTo(symbol_rect.x(), symbol_rect.y());
|
||||
path.lineTo(symbol_rect.right(), symbol_rect.bottom());
|
||||
path.moveTo(symbol_rect.right(), symbol_rect.y());
|
||||
path.lineTo(symbol_rect.x(), symbol_rect.bottom());
|
||||
const SkPath path = SkPathBuilder()
|
||||
.moveTo(symbol_rect.x(), symbol_rect.y())
|
||||
.lineTo(symbol_rect.right(), symbol_rect.bottom())
|
||||
.moveTo(symbol_rect.right(), symbol_rect.y())
|
||||
.lineTo(symbol_rect.x(), symbol_rect.bottom())
|
||||
.detach();
|
||||
canvas->DrawPath(path, flags);
|
||||
}
|
||||
|
||||
|
||||
@@ -30,8 +30,10 @@ void DestroyFunc(const v8::FunctionCallbackInfo<v8::Value>& info) {
|
||||
|
||||
// TODO(zcbenz): gin_helper::Wrappable will be removed.
|
||||
delete static_cast<gin_helper::WrappableBase*>(
|
||||
holder->GetAlignedPointerFromInternalField(0));
|
||||
holder->SetAlignedPointerInInternalField(0, nullptr);
|
||||
holder->GetAlignedPointerFromInternalField(
|
||||
0, v8::kEmbedderDataTypeTagDefault));
|
||||
holder->SetAlignedPointerInInternalField(0, nullptr,
|
||||
v8::kEmbedderDataTypeTagDefault);
|
||||
}
|
||||
|
||||
void IsDestroyedFunc(const v8::FunctionCallbackInfo<v8::Value>& info) {
|
||||
@@ -46,7 +48,8 @@ bool Destroyable::IsDestroyed(v8::Local<v8::Object> object) {
|
||||
// An object is considered destroyed if it has no internal pointer or its
|
||||
// internal has been destroyed.
|
||||
return object->InternalFieldCount() == 0 ||
|
||||
object->GetAlignedPointerFromInternalField(0) == nullptr;
|
||||
object->GetAlignedPointerFromInternalField(
|
||||
0, v8::kEmbedderDataTypeTagDefault) == nullptr;
|
||||
}
|
||||
|
||||
// static
|
||||
|
||||
@@ -61,7 +61,8 @@ class TrackableObject : public TrackableObjectBase, public EventEmitter<T> {
|
||||
v8::HandleScope scope(gin_helper::Wrappable<T>::isolate());
|
||||
v8::Local<v8::Object> wrapper = gin_helper::Wrappable<T>::GetWrapper();
|
||||
if (!wrapper.IsEmpty()) {
|
||||
wrapper->SetAlignedPointerInInternalField(0, nullptr);
|
||||
wrapper->SetAlignedPointerInInternalField(
|
||||
0, nullptr, v8::kEmbedderDataTypeTagDefault);
|
||||
gin_helper::WrappableBase::wrapper_.ClearWeak();
|
||||
}
|
||||
}
|
||||
@@ -70,7 +71,8 @@ class TrackableObject : public TrackableObjectBase, public EventEmitter<T> {
|
||||
v8::HandleScope scope(gin_helper::Wrappable<T>::isolate());
|
||||
v8::Local<v8::Object> wrapper = gin_helper::Wrappable<T>::GetWrapper();
|
||||
return wrapper->InternalFieldCount() == 0 ||
|
||||
wrapper->GetAlignedPointerFromInternalField(0) == nullptr;
|
||||
wrapper->GetAlignedPointerFromInternalField(
|
||||
0, v8::kEmbedderDataTypeTagDefault) == nullptr;
|
||||
}
|
||||
|
||||
// Finds out the TrackableObject from its ID in weak map.
|
||||
|
||||
@@ -22,7 +22,8 @@ bool IsValidWrappable(const v8::Local<v8::Value>& val,
|
||||
|
||||
const gin::DeprecatedWrapperInfo* info =
|
||||
static_cast<gin::DeprecatedWrapperInfo*>(
|
||||
port->GetAlignedPointerFromInternalField(gin::kWrapperInfoIndex));
|
||||
port->GetAlignedPointerFromInternalField(
|
||||
gin::kWrapperInfoIndex, v8::kEmbedderDataTypeTagDefault));
|
||||
if (info != wrapper_info)
|
||||
return false;
|
||||
|
||||
@@ -36,7 +37,8 @@ WrappableBase::~WrappableBase() {
|
||||
return;
|
||||
|
||||
v8::HandleScope scope(isolate());
|
||||
GetWrapper()->SetAlignedPointerInInternalField(0, nullptr);
|
||||
GetWrapper()->SetAlignedPointerInInternalField(
|
||||
0, nullptr, v8::kEmbedderDataTypeTagDefault);
|
||||
wrapper_.ClearWeak();
|
||||
wrapper_.Reset();
|
||||
}
|
||||
@@ -58,7 +60,8 @@ void WrappableBase::InitWith(v8::Isolate* isolate,
|
||||
v8::Local<v8::Object> wrapper) {
|
||||
CHECK(wrapper_.IsEmpty());
|
||||
isolate_ = isolate;
|
||||
wrapper->SetAlignedPointerInInternalField(0, this);
|
||||
wrapper->SetAlignedPointerInInternalField(0, this,
|
||||
v8::kEmbedderDataTypeTagDefault);
|
||||
wrapper_.Reset(isolate, wrapper);
|
||||
wrapper_.SetWeak(this, FirstWeakCallback,
|
||||
v8::WeakCallbackType::kInternalFields);
|
||||
@@ -158,9 +161,10 @@ v8::MaybeLocal<v8::Object> DeprecatedWrappableBase::GetWrapperImpl(
|
||||
return v8::MaybeLocal<v8::Object>(wrapper);
|
||||
}
|
||||
|
||||
int indices[] = {gin::kWrapperInfoIndex, gin::kEncodedValueIndex};
|
||||
void* values[] = {info, this};
|
||||
wrapper->SetAlignedPointerInInternalFields(2, indices, values);
|
||||
wrapper->SetAlignedPointerInInternalField(gin::kWrapperInfoIndex, info,
|
||||
v8::kEmbedderDataTypeTagDefault);
|
||||
wrapper->SetAlignedPointerInInternalField(gin::kEncodedValueIndex, this,
|
||||
v8::kEmbedderDataTypeTagDefault);
|
||||
wrapper_.Reset(isolate, wrapper);
|
||||
wrapper_.SetWeak(this, FirstWeakCallback,
|
||||
v8::WeakCallbackType::kInternalFields);
|
||||
@@ -180,7 +184,8 @@ void* FromV8Impl(v8::Isolate* isolate, v8::Local<v8::Value> val) {
|
||||
v8::Local<v8::Object> obj = val.As<v8::Object>();
|
||||
if (obj->InternalFieldCount() != 1)
|
||||
return nullptr;
|
||||
return obj->GetAlignedPointerFromInternalField(0);
|
||||
return obj->GetAlignedPointerFromInternalField(
|
||||
0, v8::kEmbedderDataTypeTagDefault);
|
||||
}
|
||||
|
||||
void* FromV8Impl(v8::Isolate* isolate,
|
||||
@@ -205,7 +210,8 @@ void* FromV8Impl(v8::Isolate* isolate,
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return obj->GetAlignedPointerFromInternalField(gin::kEncodedValueIndex);
|
||||
return obj->GetAlignedPointerFromInternalField(
|
||||
gin::kEncodedValueIndex, v8::kEmbedderDataTypeTagDefault);
|
||||
}
|
||||
|
||||
} // namespace internal
|
||||
@@ -219,7 +225,8 @@ DeprecatedWrapperInfo* DeprecatedWrapperInfo::From(
|
||||
if (object->InternalFieldCount() != kNumberOfInternalFields)
|
||||
return NULL;
|
||||
DeprecatedWrapperInfo* info = static_cast<DeprecatedWrapperInfo*>(
|
||||
object->GetAlignedPointerFromInternalField(kWrapperInfoIndex));
|
||||
object->GetAlignedPointerFromInternalField(
|
||||
kWrapperInfoIndex, v8::kEmbedderDataTypeTagDefault));
|
||||
return info->embedder == kEmbedderNativeGin ? info : NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -552,7 +552,7 @@ node::IsolateData* NodeBindings::isolate_data(
|
||||
}
|
||||
auto* isolate_data = static_cast<node::IsolateData*>(
|
||||
context->GetAlignedPointerFromEmbedderData(
|
||||
kElectronContextEmbedderDataIndex));
|
||||
kElectronContextEmbedderDataIndex, v8::kEmbedderDataTypeTagDefault));
|
||||
CHECK(isolate_data);
|
||||
CHECK(isolate_data->event_loop());
|
||||
return isolate_data;
|
||||
@@ -767,7 +767,8 @@ std::shared_ptr<node::Environment> NodeBindings::CreateEnvironment(
|
||||
auto* isolate_data = node::CreateIsolateData(isolate, uv_loop_, platform);
|
||||
isolate_data->max_young_gen_size = max_young_generation_size;
|
||||
context->SetAlignedPointerInEmbedderData(kElectronContextEmbedderDataIndex,
|
||||
static_cast<void*>(isolate_data));
|
||||
static_cast<void*>(isolate_data),
|
||||
v8::kEmbedderDataTypeTagDefault);
|
||||
|
||||
uint64_t env_flags = node::EnvironmentFlags::kDefaultFlags |
|
||||
node::EnvironmentFlags::kHideConsoleWindows |
|
||||
@@ -892,7 +893,8 @@ std::shared_ptr<node::Environment> NodeBindings::CreateEnvironment(
|
||||
// Since we're about to free `isolate_data`, clear that entry
|
||||
v8::HandleScope handle_scope{isolate};
|
||||
context.Get(isolate)->SetAlignedPointerInEmbedderData(
|
||||
kElectronContextEmbedderDataIndex, nullptr);
|
||||
kElectronContextEmbedderDataIndex, nullptr,
|
||||
v8::kEmbedderDataTypeTagDefault);
|
||||
context.Reset();
|
||||
|
||||
node::FreeEnvironment(nenv);
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include <numbers>
|
||||
#include "base/check.h"
|
||||
#include "base/check_op.h"
|
||||
#include "third_party/skia/include/core/SkPathBuilder.h"
|
||||
|
||||
namespace electron {
|
||||
|
||||
@@ -99,7 +100,7 @@ constexpr CurveGeometry::CurveGeometry(float radius, float smoothness) {
|
||||
((edge_connecting_offset - arc_curve_offset) * EDGE_CURVE_POINT_RATIO);
|
||||
}
|
||||
|
||||
void DrawCorner(SkPath& path,
|
||||
void DrawCorner(SkPathBuilder& path,
|
||||
float radius,
|
||||
float smoothness1,
|
||||
float smoothness2,
|
||||
@@ -148,8 +149,9 @@ void DrawCorner(SkPath& path,
|
||||
{
|
||||
SkPoint arc_connecting_point =
|
||||
corner + QuarterRotate(curve2.arc_connecting_vector, quarter_rotations);
|
||||
path.arcTo(SkPoint::Make(radius, radius), 0.0f, SkPath::kSmall_ArcSize,
|
||||
SkPathDirection::kCW, arc_connecting_point);
|
||||
path.arcTo(SkPoint::Make(radius, radius), 0.0f,
|
||||
SkPathBuilder::kSmall_ArcSize, SkPathDirection::kCW,
|
||||
arc_connecting_point);
|
||||
}
|
||||
|
||||
// Draw the second smoothing curve
|
||||
@@ -287,7 +289,7 @@ SkPath DrawSmoothRoundRect(float x,
|
||||
auto [left_top_smoothness, left_bottom_smoothness] = ConstrainSmoothness(
|
||||
height, smoothness, top_left_radius, bottom_left_radius);
|
||||
|
||||
SkPath path;
|
||||
SkPathBuilder path;
|
||||
|
||||
// Top left corner
|
||||
DrawCorner(path, top_left_radius, left_top_smoothness, top_left_smoothness,
|
||||
@@ -306,7 +308,7 @@ SkPath DrawSmoothRoundRect(float x,
|
||||
left_bottom_smoothness, SkPoint::Make(x, y + height), 3);
|
||||
|
||||
path.close();
|
||||
return path;
|
||||
return path.detach();
|
||||
}
|
||||
|
||||
} // namespace electron
|
||||
|
||||
@@ -59,9 +59,11 @@ class PreloadRealmLifetimeController
|
||||
RegisterDebugger(initiator_execution_context);
|
||||
|
||||
initiator_context()->SetAlignedPointerInEmbedderData(
|
||||
kElectronContextEmbedderDataIndex, static_cast<void*>(this));
|
||||
kElectronContextEmbedderDataIndex, static_cast<void*>(this),
|
||||
v8::kEmbedderDataTypeTagDefault);
|
||||
realm_context()->SetAlignedPointerInEmbedderData(
|
||||
kElectronContextEmbedderDataIndex, static_cast<void*>(this));
|
||||
kElectronContextEmbedderDataIndex, static_cast<void*>(this),
|
||||
v8::kEmbedderDataTypeTagDefault);
|
||||
|
||||
metrics_ = base::ProcessMetrics::CreateCurrentProcessMetrics();
|
||||
RunInitScript();
|
||||
@@ -74,7 +76,8 @@ class PreloadRealmLifetimeController
|
||||
}
|
||||
auto* controller = static_cast<PreloadRealmLifetimeController*>(
|
||||
context->GetAlignedPointerFromEmbedderData(
|
||||
kElectronContextEmbedderDataIndex));
|
||||
kElectronContextEmbedderDataIndex,
|
||||
v8::kEmbedderDataTypeTagDefault));
|
||||
CHECK(controller);
|
||||
return controller;
|
||||
}
|
||||
@@ -112,7 +115,8 @@ class PreloadRealmLifetimeController
|
||||
void ContextDestroyed() override {
|
||||
v8::HandleScope handle_scope(realm_isolate());
|
||||
realm_context()->SetAlignedPointerInEmbedderData(
|
||||
kElectronContextEmbedderDataIndex, nullptr);
|
||||
kElectronContextEmbedderDataIndex, nullptr,
|
||||
v8::kEmbedderDataTypeTagDefault);
|
||||
|
||||
// See ShadowRealmGlobalScope::ContextDestroyed
|
||||
shadow_realm_script_state_->DisposePerContextData();
|
||||
|
||||
Reference in New Issue
Block a user