Charles Kerr

Results 81 issues of Charles Kerr

#### Description of Change Use `base::Value::TakeDict()`, `TakeList()`, and `TakeString()` where appropriate. 1. The docs recommend changing our current `std::move(value.Get*())` to `std::move(value).Take*()` for better build-time checks. 2. In some cases, e.g....

semver/patch
no-backport

I used [this script](https://gist.github.com/ckerr/6acb982f1c44ad24fab344ba98e3c1e0) to run lossless compression utils [zopflipng, optipng, advpng, pngcrush] dialed to maximum (e.g. `advpng --shrink-insane`) on all the png files in the repo. The ugly: this...

#### Description of Change Use `v8::String::NewFromUtf8Literal()` where possible because it's a little faster than `v8::String::NewFromUtf8()`. We have a lot of places with string literals, e.g. in dictionary getter/setter calls. From...

performance :checkered_flag:
semver/patch
target/31-x-y
target/32-x-y
target/33-x-y

#### Description of Change Remove a small piece of unused code: `WinFrameView::kInactiveTitlebarFeatureAlpha` was added in Aug 2021 (41646d11, #29600) but never used. #### Checklist - [x] PR description included and...

semver/patch
new-pr 🌱
target/31-x-y
target/32-x-y
target/33-x-y

#### Description of Change Simplify KeyWeakMap's implementation a little: - Instead of having a MappedType of `std::pair`, make a private struct that holds A, B, and C - Use `base::ToVector()`...

semver/patch
new-pr 🌱
target/31-x-y
target/32-x-y
target/33-x-y

#### Description of Change `std::ranges` is [allowed now](https://chromium-review.googlesource.com/c/chromium/src/+/5668999), so let's use it. This PR migrates the lowest-hanging fruit, e.g. easy cases like this: ```diff - std::sort(foo.begin(), foo.end()); + std::ranges::sort(foo); ```...

semver/patch
new-pr 🌱
target/33-x-y

#### Description of Change Part 19 in a [series](https://github.com/electron/electron/pull/43477) to fix `-Wunsafe-buffer-usage` warnings in `shell/`. This PR fixes warnings in an array loop in `TaskbarHost::SetThumbarButtons()` by adding `constexpr` and `std::array`...

semver/patch
new-pr 🌱
target/31-x-y
target/32-x-y
target/33-x-y

Enable `-Wunsafe-buffer-usage` warnings in Electron's codebase. There are still a few warnings left, so this PR is gonna be red for a few more days. The CI failures in this...

component/build
do-not-merge

#### Description of Change Only the Mac subclass of NativeWindow uses the child_windows_ field, so move that field to the subclass. #### Checklist - [x] PR description included and stakeholders...

semver/patch
target/31-x-y
target/32-x-y
target/33-x-y
target/34-x-y

#### Description of Change We have a handful of persistent handles that we've been storing as `base::NoDestructor` objects. This PR stores them as `v8::Eternal` objects instead, both to improve GC...

performance :checkered_flag:
semver/patch
target/33-x-y
target/34-x-y