* refactor: more return-braced-init-list, this time for v8 and gin objects
* refactor: more return-braced-init-list, this time for v8, gin, std, and base objects
* refactor: misc-use-internal-linkage warnings in context bridge
move impl functions into anonymous namespace so that they're not visible
to other compilation units:
- ExposeAPIInWorld()
- IsCalledFromMainWorld()
- OverrideGlobalPropertyFromIsolatedWorld()
- OverrideGlobalValueFromIsolatedWorld()
- TraceKeyPath()
* refactor: misc-use-internal-linkage warnings in skia util
move impl details into anonymous namespace so that they're not visible
to other compilation units:
- struct ScaleFactorPair
- kScaleFactorPairs[]
- GetScaleFactorFromPath()
- AddImageSkiaRepFromPath()
* refactor: misc-use-internal-linkage warnings in printing util
move impl details into anonymous namespace so that they're not visible
to other compilation units:
- GetFullPagePlugin()
* refactor: misc-use-internal-linkage warnings in blijnk converter
move impl details into anonymous namespace so that they're not visible
to other compilation units:
- GetKeyLocationCode()
- ModifiersToArray()
* refactor: misc-use-internal-linkage warnings in extrension system
move impl details into anonymous namespace so that they're not visible
to other compilation units:
- ParseManifest()
* refactor: misc-use-internal-linkage warnings in skia util
move impl details into anonymous namespace so that they're not visible
to other compilation units:
- GetFrameTokenMap()
- GetFrameTreeNodeIdMap()
* refactor: misc-use-internal-linkage warnings in electron_api_utility_process.cc
move impl details into anonymous namespace so that they're not visible
to other compilation units:
- GetAllUtilityProcessWrappers()
* refactor: misc-use-internal-linkage warnings in electron_api_menu
move impl details into anonymous namespace so that they're not visible
to other compilation units:
- InvokeBoolMethod()
* refactor: misc-use-internal-linkage warnings in platform util
move impl details into anonymous namespace so that they're not visible
to other compilation units:
- struct TrashItemResult
- TrashItemOnBlockingThread()
* refactor: avoid repeating the return type from the declaration; use a braced initializer list instead [modernize-return-braced-init-list]
* refactor: avoid repeating the return type from the declaration; use a braced initializer list instead [modernize-return-braced-init-list]
NB: using the braced-initializer list uncovered an error here:
the float returned by std::floor() can't be implicitly cast to
an int. This is solved by using base::ClampFloor<int>() instead.
std::floor()
* feat: add query-session-end event for Windows
* fix: remove debug line
* feat: notify with reason on session-end
* docs: add comments and return params
* docs: add same docs to the BrowserWindow
* fix: add shutdown reason if lParam == 0
* docs: remove 'force' word
* docs: revert multithreading.md change
* docs: add reasons documentation, reason variable renamed to reasons
* docs: improve 'shutdown' reason wording
* docs: reword with 'can be'
* fix: pass reasons by reference
* fix: use newer approach which expose reasons value directly on Event object
* docs: add escaping
* style: linter fixes
* fix: project now should compile
* fix: EmitWithoutEvent method added, EmitWithEvent moved to private again
* docs: typo fix
Co-authored-by: Sam Maddock <samuel.maddock@gmail.com>
* docs: dedicated WindowSessionEndEvent type created
* docs: better wording for session-end event description
Co-authored-by: Will Anderson <will@itsananderson.com>
---------
Co-authored-by: Sam Maddock <samuel.maddock@gmail.com>
Co-authored-by: Will Anderson <will@itsananderson.com>
* fix: performance-no-automatic-move in GetLogFileName()
remove `const` from log_filename.
Warning fixed by this commit:
../../electron/shell/common/logging.cc:40:12: warning: constness of 'log_filename' prevents automatic move [performance-no-automatic-move]
* fix: performance-no-automatic-move in GetBundleResourcePath()
remove `const` from request_relative_path.
Warning fixed by this commit:
electron/shell/browser/extensions/electron_extensions_browser_client.cc:187:10: warning: constness of 'request_relative_path' prevents automatic move [performance-no-automatic-move]
* refactor: use gdk_display_beep() to beep on Linux
* chore: make a stub declaration for gdk_display_beep()
* chore: remove unused file electron_gtk.sigs
* chore: remove unused #includes to make gn check happy
* fix: bugprone-narrowing-conversions warning in NativeImage::memory_usage_
- fix signed / unsigned math by using base/numerics/safe_conversions
- make memory_usage_ an int64_t so it can safely take the size_t
returned by computeByteSize()
Warning fixed by this commit:
../../electron/shell/common/api/electron_api_native_image.cc:155:26: warning: narrowing conversion from 'size_t' (aka 'unsigned long') to signed type 'int32_t' (aka 'int') is implementation-defined [bugprone-narrowing-conversions]
155 | new_memory_usage = image_skia->bitmap()->computeByteSize();
* fix: bugprone-narrowing-conversions warnings in NativeImage::CreateFromBitmap()
`SkImageInfo::MakeN32()` and `SkBitmap::allocN32Pixels()` both take int
width and height args, but we were feeding them unsigned ints.
../../electron/shell/common/api/electron_api_native_image.cc:508:36: warning: narrowing conversion from 'unsigned int' to signed type 'int' is implementation-defined [bugprone-narrowing-conversions]
508 | auto info = SkImageInfo::MakeN32(width, height, kPremul_SkAlphaType);
| ^
../../electron/shell/common/api/electron_api_native_image.cc:508:43: warning: narrowing conversion from 'unsigned int' to signed type 'int' is implementation-defined [bugprone-narrowing-conversions]
508 | auto info = SkImageInfo::MakeN32(width, height, kPremul_SkAlphaType);
| ^
../../electron/shell/common/api/electron_api_native_image.cc:524:25: warning: narrowing conversion from 'unsigned int' to signed type 'int' is implementation-defined [bugprone-narrowing-conversions]
524 | bitmap.allocN32Pixels(width, height, false);
| ^
../../electron/shell/common/api/electron_api_native_image.cc:524:32: warning: narrowing conversion from 'unsigned int' to signed type 'int' is implementation-defined [bugprone-narrowing-conversions]
524 | bitmap.allocN32Pixels(width, height, false);
| ^
../../electron/shell/common/api/electron_api_native_image.cc:528:48: warning: narrowing conversion from 'double' to 'float' [bugprone-narrowing-conversions]
528 | gfx::ImageSkia::CreateFromBitmap(bitmap, scale_factor);
* fix: Use openURL:configuration:completionHandler instead of openUrl
* test: add a test
* fix: add dispatch_async to replace GetUIThreadTaskRunner
* refactor: remove unused import
* fix: update to use BindPostTaskToCurrentDefault
* test: add regression test for window focus
* refactor: update to explicit task runner
* refactor: move uv_setup_args() calls to startup
* refactor: call base::CommandLine::Init() before ContentMain()
* feat: add ElectronCommandLine::AsUtf8()
* refactor: call base::CommandLine::Init() before NodeMain()
* refactor: use ElectronCommandLine::AsUtf8() in NodeMain()
* fix: -Wunsafe-buffer-usage warning in ElectronCommandLine::Init()
* chore: add a DCHECK to confirm ElectronCommandLine was initialized before AsUtf8() is called
* chore: const correctness in ElectronCommandLine::Init() args
* chore: add ElectronCommandLine to macOS Electron Helper app
* chore: move argc, argvc setup into electron_library_main on macOS
* chore: revert BUILD.gn changes
* fix: WideToUTF8() call in ElectronCommandLine::AsUtf8()
* build: add uv to the include paths for app/electron_main_linux
* build: add uv to the include paths for app/electron_library_main.mm
* chore: revert unrelated changes
these were intended for another branch
* refactor: BaseWindow::OnExecuteAppCommand() now takes a std::string_view
* refactor: NativeWindow::NotifyWindowExecuteAppCommand() takes a std::string_view
* refactor: AppCommandToString() returns a std::string_view, is now constexpr
* refactor: make kBrowserBackward, kBrowserForward inline constexpr std::string_view
Xref: https://abseil.io/tips/140https://groups.google.com/a/chromium.org/g/chromium-dev/c/jROTxMo_m2Q/m/HgciN2KsAgAJ
* refactor: use inline constexpr string_view for kDevice*Key constants
Xref: https://abseil.io/tips/140https://groups.google.com/a/chromium.org/g/chromium-dev/c/jROTxMo_m2Q/m/HgciN2KsAgAJ
* refactor: IsEnvSet now takes a base::cstring_view
* refactor: use inline constexpr cstring_view for kRunAsNode
* refactor: use inline constexpr string_view for kPDF*PluginName
* refactor: use base::FilePath::FromASCII() since "internal-pdf-viewer" is ascii
* chore: remove unused shell/common/electron_constants.cc
* fixup! refactor: IsEnvSet now takes a base::cstring_view
* perf: prefer NewFromUtf8Literal() over NewFromUtf8() for string literals
the string length is known at compile time and no need to call ToLocalChecked()
* perf: string length is known when calling NewFromUtf8(), so use it
* perf: remove unnecessary calls to c_str()
these just force the code being called to have to recalculate the string length
* chore: move as_byte_span() to new shell/common/mac_util.h
this way it can be used by multiple mm files
* fix: -Wunsafe-buffer-usage warnings in UNNotificationResponseToNSDictionary
* refactor: use base::HexEncode() instead of rolling our own
* fixup! chore: move as_byte_span() to new shell/common/mac_util.h
* fixup! chore: move as_byte_span() to new shell/common/mac_util.h
fix: move mac_util to the right place in filenames.gni
* chore: bump chromium in DEPS to 131.0.6756.0
* chore: update disable_hidden.patch
no code changes; just handling upstream context shear
https://chromium-review.googlesource.com/c/chromium/src/+/5887019
* chore: update feat_expose_raw_response_headers_from_urlloader.patch
Factor out URLLoader's URLRequest configuration into a helper
Xref: https://chromium-review.googlesource.com/c/chromium/src/+/5902254
* chore: update fix_disabling_background_throttling_in_compositor.patch
no manual changes; patch applied with fuzz 1
* chore: e patches all
* 5882129: Fix basic auth issues for sub frame and sub resources | https://chromium-review.googlesource.com/c/chromium/src/+/5882129
- Add `is_request_for_navigation` param to
ElectronBrowserClient::CreateLoginDelegate().
- Propagate the flag as another undocumented property
in the app.login Event's authenticationResponseDetails object
- Side cleanup: also in CreateLoginDelegate(), use upstream's name
for the `is_request_for_main_frame` param, renamed back in
https://chromium-review.googlesource.com/c/chromium/src/+/3256171
* 5875189: [FSA] Check for DANGEROUS extension types when creating a new file. | https://chromium-review.googlesource.com/c/chromium/src/+/5875189
* chore: node ./script/gen-libc++-filenames.js
* chore: bump chromium in DEPS to 131.0.6758.0
* chore: bump chromium in DEPS to 131.0.6760.0
* chore: update patches
* [A11y] Remove Accessibility Object Model (AOM)
Refs https://chromium-review.googlesource.com/c/chromium/src/+/5896593
* chore: bump chromium in DEPS to 131.0.6762.0
* [heap] Remove deprecated V8 flag
Refs https://chromium-review.googlesource.com/c/v8/v8/+/5904046
---------
Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
Co-authored-by: deepak1556 <hop2deep@gmail.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.
* 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>
prefactor: prefer member initializers in asar::Archive
prefactor: prefer member initializers in asar::Archive::FileInfo
prefactor: prefer member initializers in asar::IntegrityPayload
* refactor: CallMethodWithArgs() now takes a span of value handles
* perf: use std::array instead of std::vector to hold Emit arg parameter packs
* chore: remove unused gin_helper::EmitEvent(iso, obj, name, span<Local>)