fixup e8948397 really fix the warning this time
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* refactor: const correctness
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* refactor: extract-method AsarFileValidator::EnsureHashExists()
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* refactor: replace use of deprecated crypto API
https://crbug.com/364687923
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* refactor: use span API in AsarFileValidator::OnRead()
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* refactor: replace use of deprecated crypto API
https://crbug.com/364687923
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* fixup! refactor: use span API in AsarFileValidator::OnRead()
fix: electron-ia32-testing FTBFS
Co-authored-by: Charles Kerr <charles@charleskerr.com>
---------
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
perf: use ArrayBuffer::Data() API
Replace our `GetBackingStore()->Data()` calls with this instead.
Explained by the V8 docs, ArrayBuffer.Data() is
> More efficient shortcut for GetBackingStore()->Data(). The
> returned pointer is valid as long as the ArrayBuffer is alive.
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
fix: -Wunsafe-buffer-usage warnings in ElectronComponentExtensionResourceManager::AddComponentResourceEntries()
just replace pointer-and-length args with a span
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* fix: do not build electron_plugin_info_host_impl.cc when plugins are disabled
it fails to build from source with this error:
../../content/public/browser/plugin_service.h:17:2: error: "Plugins should be enabled"
17 | #error "Plugins should be enabled"
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* fix: FTBFS in printing_utils.cc when ENABLE_PDF is false
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* fixup! fix: do not build electron_plugin_info_host_impl.cc when plugins are disabled
fix BUILD.gn linting
Co-authored-by: Charles Kerr <charles@charleskerr.com>
---------
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* feat: add error event for utility process (#43774)
* feat: add error event for utility process
* chore: use public report api
* chore: fix lint
* doc: mark error event as experimental
---------
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
* fixup! feat: add error event for utility process (#43774)
remove #include "electron/mas.h"
this header did not exist before c1c8fbfd9
---------
Co-authored-by: Robo <hop2deep@gmail.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
perf: build GettextPackage name at compile time
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
notify_notification_set_hint_string() is deprecated, so let's use
notify_notification_set_hint() instead.
Xref: 2fe1748295
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* fix: -Wunsafe-buffer-usage warnings in GdkPixbufFromSkBitmap()
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* refactor: don't change previous behavior for 0-height images
Is a 0x0 image even a thing? I'm not sure; but just in case, let's
treat it the same way the previous implementation did.
Co-authored-by: Charles Kerr <charles@charleskerr.com>
---------
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
test: expect a `sender-pid` hint in Linux notifications.
This PR ensures that the `sender-pid` hint is set for new notifications.
It also updates the spec to confirm that DBus receives the hint and that
it has the correct value.
This fixes a spec failure when running libnotify >= 0.7.12 (2022-05-05).
Starting with that version, libnotify started injecting `sender-pid` if
not provided by the client. So our tests received a slightly different
DBus payload depending on what version of libnotify was installed,
causing our deep-equals tests to fail.
By always providing and testing the `sender-pid` hint, our behavior and
tests should be consistent across distros.
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
Right now DelayedNativeViewHost attaches its underlying native view
when it's being attached to a widget but it doesn't detach it when
it's being detached. It may lead to use-after-free and crash.
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Cezary Kulakowski <cezary@openfin.co>
Add a `base::WeakPtr<WebContents>` field to SerialChooserController and
stop subclassing from WebContentsObserver. This follows the Observer docs:
> don't create a `WebContentsObserver` just to be able to check
> for a null `WebContentsObserver::web_contents()`.
> Use a `base::WeakPtr<WebContents>` instead.
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
prefactor: prefer member initializers in asar::Archive
prefactor: prefer member initializers in asar::Archive::FileInfo
prefactor: prefer member initializers in asar::IntegrityPayload
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
A small cleanup to remove use of the C-style function declaration idiom.
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* fix: -Wunsafe-buffer-usage warnings in Clipboard::WriteBuffer()
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* chore: add a DCHECK to confirm the BigBuffer is full
Co-authored-by: Charles Kerr <charles@charleskerr.com>
---------
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
refactor: reduce code duplication in gin_helper::Promise (#43716)
* refactor: move scope scaffolding into SettletScope
idea stolen from SpellCheckScope
* refactor: move impl of PromiseBase::RejectPromise() to the cc file
* chore: remove unused #include
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
perf: hold V8FunctionInvoker args in a std::array
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* refactor: CallMethodWithArgs() now takes a span of value handles
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* perf: use std::array instead of std::vector to hold Emit arg parameter packs
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* chore: remove unused gin_helper::EmitEvent(iso, obj, name, span<Local>)
Co-authored-by: Charles Kerr <charles@charleskerr.com>
---------
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
fix: Emit() should not leak converted arg handles into caller's HandleScope
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
Closes https://github.com/electron/electron/issues/43714.
Fixes an issue where the resizing border was not being handled correctly on Linux WCO
caption buttons. This is now taken into account as a part of the NonClientHitTest.
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
fix: prevent spinning cursor when launching utility process on Windows
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Niklas Wenzel <dev@nikwen.de>
* fix: restore Chromium default Content-Disposition header parsing
Co-authored-by: Milan Burda <milan.burda@gmail.com>
* Update api-web-request-spec.ts
Co-authored-by: Milan Burda <milan.burda@gmail.com>
---------
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Milan Burda <milan.burda@gmail.com>
refactor: use an EscapableHandleScope
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>