electron/shell/common
trop[bot] 8d9ed52c72
perf: avoid redundant Promise.GetContext calls (#43620)
refactor: avoid redundant Promise.GetContext calls

Several Promise methods call `GetContext()` multiple times. From looking
at the assembly in obj/electron/electron_lib/promise.o, these redundant
calls are actually being made -- they aren't optmized out.

This PR keeps the return value in a local variable to avoid extra calls.

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2024-09-08 10:37:42 -05:00
..
api refactor: declare gin::Wrapper subclasses as final (#43565) 2024-09-04 21:26:25 -05:00
asar refactor: take a uint8_t span in ValidateIntegrityOrDie() (#43612) 2024-09-06 21:56:27 -05:00
extensions refactor: move impl functions into private namespace (#43408) 2024-08-21 19:43:01 -05:00
gin_converters refactor: declare gin::Wrapper subclasses as final (#43565) 2024-09-04 21:26:25 -05:00
gin_helper perf: avoid redundant Promise.GetContext calls (#43620) 2024-09-08 10:37:42 -05:00
mac chore: remove unused #includes (#42971) 2024-07-22 11:31:32 +02:00
resources/mac fix: disable MallocNanoZone on mac (#33704) 2022-04-28 10:28:27 -04:00
application_info.cc fix: devtools allow restoring saved dock state on Windows (#39734) 2023-09-07 17:14:01 +09:00
application_info.h fix: devtools allow restoring saved dock state on Windows (#39734) 2023-09-07 17:14:01 +09:00
application_info_linux.cc chore: remove unused #includes (#42971) 2024-07-22 11:31:32 +02:00
application_info_mac.mm chore: bump chromium to 118.0.5975.0 (main) (#39531) 2023-09-01 15:54:59 +09:00
application_info_win.cc chore: remove unused #includes (#42971) 2024-07-22 11:31:32 +02:00
BUILD.gn chore: bump chromium to 129.0.6650.0 (main) (#43266) 2024-08-12 10:28:33 +02:00
color_util.cc chore: remove unused #includes (#42971) 2024-07-22 11:31:32 +02:00
color_util.h feat: replace BrowserView with WebContentsView (#35658) 2023-12-13 13:01:03 -08:00
crash_keys.cc refactor: prefer std::ranges over begin() and end() (#43482) 2024-08-26 14:37:56 -04:00
crash_keys.h chore: used nested namespaces (#34737) 2022-06-29 12:55:47 -07:00
electron_command_line.cc chore: bump chromium to 100.0.4857.0 (main) (#32419) 2022-02-09 18:58:52 -08:00
electron_command_line.h chore: bump chromium to 100.0.4857.0 (main) (#32419) 2022-02-09 18:58:52 -08:00
electron_constants.cc build: remove enable_run_as_node build flag (#38413) 2023-06-08 16:40:08 -04:00
electron_constants.h chore: remove more unused #include calls (#43000) 2024-07-25 11:25:45 +02:00
electron_paths.h feat: allow customizing browser data location (#33554) 2022-05-09 10:26:57 -04:00
heap_snapshot.cc chore: enable check raw ptr fields (#38167) 2023-05-11 16:07:39 -04:00
heap_snapshot.h
key_weak_map.h refactor: simplify KeyWeakMap impl (#43483) 2024-08-26 18:09:12 -04:00
keyboard_util.cc chore: bump chromium to 128.0.6558.0 (main) (#42413) 2024-07-02 09:51:33 +02:00
keyboard_util.h chore: migrate base::StringPiece to std::string_view (#40915) 2024-01-10 19:00:37 -06:00
language_util.h
language_util_linux.cc feat: add app.getPreferredSystemLanguages() API (#36035) 2022-11-09 10:50:43 -05:00
language_util_mac.mm
language_util_win.cc chore: remove more unused #include calls (#43000) 2024-07-25 11:25:45 +02:00
logging.cc refactor: move impl functions into private namespace (#43408) 2024-08-21 19:43:01 -05:00
logging.h
node_bindings.cc refactor: prefer std::ranges over begin() and end() (#43482) 2024-08-26 14:37:56 -04:00
node_bindings.h fix: delete UvTaskRunner's timers only after they're closed (#43597) 2024-09-06 08:37:33 -05:00
node_bindings_linux.cc refactor: NodeBindings::Create() returns a unique_ptr (#43381) 2024-08-21 10:15:04 +02:00
node_bindings_linux.h chore: remove unused #includes (#42971) 2024-07-22 11:31:32 +02:00
node_bindings_mac.cc refactor: NodeBindings::Create() returns a unique_ptr (#43381) 2024-08-21 10:15:04 +02:00
node_bindings_mac.h chore: remove unused #includes (#42971) 2024-07-22 11:31:32 +02:00
node_bindings_win.cc refactor: NodeBindings::Create() returns a unique_ptr (#43381) 2024-08-21 10:15:04 +02:00
node_bindings_win.h chore: remove unused #includes (#42971) 2024-07-22 11:31:32 +02:00
node_includes.h chore: rename built-in modules to bindings to match naming update in node (#37182) 2023-02-09 10:31:38 +09:00
node_util.cc chore: remove node patches by using the preload feature (#41080) 2024-01-24 09:54:32 -06:00
node_util.h chore: more iwyu (#43063) 2024-07-29 12:42:57 -05:00
options_switches.cc chore: deprecate textured BrowserWindow type option on macOS (#43133) 2024-08-12 10:32:35 +02:00
options_switches.h chore: deprecate textured BrowserWindow type option on macOS (#43133) 2024-08-12 10:32:35 +02:00
platform_util.cc chore: remove unused #includes (#42971) 2024-07-22 11:31:32 +02:00
platform_util.h feat: update app.{set|get}LoginItemSettings(settings) (#37244) 2023-10-16 12:25:11 -04:00
platform_util_internal.h chore: used nested namespaces (#34737) 2022-06-29 12:55:47 -07:00
platform_util_linux.cc fix: Launch apps with XDG_ACTIVATION_TOKEN in ozone/wayland (#43579) 2024-09-05 15:00:15 -05:00
platform_util_mac.mm refactor: migrate deprecated platform_util_mac calls (#43161) 2024-08-15 10:53:38 -04:00
platform_util_win.cc chore: remove more unused #include calls (#43000) 2024-07-25 11:25:45 +02:00
plugin.mojom chore: bump chromium to 129.0.6650.0 (main) (#43266) 2024-08-12 10:28:33 +02:00
plugin_info.cc chore: bump chromium to 123.0.6312.5 (main) (#41337) 2024-02-21 15:27:05 -05:00
plugin_info.h chore: bump chromium to 109.0.5382.0 (main) (#36057) 2022-10-27 12:37:04 -04:00
process_util.cc chore: bump chromium to 129.0.6616.0 (main) (#43012) 2024-07-29 09:37:35 -04:00
process_util.h refactor: use process_util.h helpers (#38574) 2023-06-06 17:19:13 +09:00
skia_util.cc chore: bump chromium to 110.0.5415.0 (main) (#36186) 2022-11-17 14:59:23 -05:00
skia_util.h chore: used nested namespaces (#34737) 2022-06-29 12:55:47 -07:00
thread_restrictions.h chore: bump chromium to 110.0.5415.0 (main) (#36186) 2022-11-17 14:59:23 -05:00
v8_value_serializer.cc fix: gin_helper::MicrotasksScope instantiation (#43185) 2024-08-05 08:24:27 -05:00
v8_value_serializer.h chore: bump chromium to 102.0.4961.0 (main) (#33091) 2022-03-24 21:39:03 -04:00
world_ids.h