electron/shell/common/gin_helper
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
..
accessor.h chore: enable check raw ptr fields (#38167) 2023-05-11 16:07:39 -04:00
arguments.cc chore: migrate base::StringPiece to std::string_view (#40915) 2024-01-10 19:00:37 -06:00
arguments.h chore: migrate base::StringPiece to std::string_view (#40915) 2024-01-10 19:00:37 -06:00
callback.cc refactor: add gin_helper::Dictionary::CreateEmpty() helper (#39547) 2023-08-21 10:43:41 +09:00
callback.h fix: gin_helper::MicrotasksScope instantiation (#43185) 2024-08-05 08:24:27 -05:00
cleaned_up_at_exit.cc refactor: move impl functions into private namespace (#43408) 2024-08-21 19:43:01 -05:00
cleaned_up_at_exit.h chore: add ELECTRON_ prefix to C++ include guards (#31925) 2021-11-22 16:34:31 +09:00
constructible.h chore: more iwyu (#43063) 2024-07-29 12:42:57 -05:00
constructor.h refactor: update gin_helper/function_template (#41534) 2024-03-25 10:01:54 +01:00
destroyable.cc chore: more iwyu (#43063) 2024-07-29 12:42:57 -05:00
destroyable.h chore: more iwyu (#43063) 2024-07-29 12:42:57 -05:00
dictionary.h perf: avoid duplicate calculations in gin_helper::Dictionary getters (#43073) 2024-07-29 12:43:28 -05:00
error_thrower.cc chore: migrate base::StringPiece to std::string_view (#40915) 2024-01-10 19:00:37 -06:00
error_thrower.h chore: more iwyu (#43063) 2024-07-29 12:42:57 -05:00
event.cc chore: more iwyu (#43063) 2024-07-29 12:42:57 -05:00
event.h refactor: declare gin::Wrapper subclasses as final (#43565) 2024-09-04 21:26:25 -05:00
event_emitter.h chore: remove unused #includes (#42971) 2024-07-22 11:31:32 +02:00
event_emitter_caller.cc fix: gin_helper::MicrotasksScope instantiation (#43185) 2024-08-05 08:24:27 -05:00
event_emitter_caller.h chore: add ELECTRON_ prefix to C++ include guards (#31925) 2021-11-22 16:34:31 +09:00
event_emitter_template.cc refactor: simplify events (#37099) 2023-02-13 13:39:18 -08:00
event_emitter_template.h refactor: simplify events (#37099) 2023-02-13 13:39:18 -08:00
function_template.cc chore: remove unused #includes (#42971) 2024-07-22 11:31:32 +02:00
function_template.h fix: gin_helper::MicrotasksScope instantiation (#43185) 2024-08-05 08:24:27 -05:00
function_template_extensions.h chore: replace absl::optional<T> with std::optional<T> (#40928) 2024-01-10 16:23:35 -06:00
locker.cc chore: more iwyu (#43063) 2024-07-29 12:42:57 -05:00
locker.h chore: more iwyu (#43063) 2024-07-29 12:42:57 -05:00
microtasks_scope.cc fix: crash in utilityProcess when generating code from strings (#38014) 2023-04-20 09:27:02 +09:00
microtasks_scope.h fix: gin_helper::MicrotasksScope instantiation (#43185) 2024-08-05 08:24:27 -05:00
object_template_builder.cc chore: migrate base::StringPiece to std::string_view (#40915) 2024-01-10 19:00:37 -06:00
object_template_builder.h chore: migrate base::StringPiece to std::string_view (#40915) 2024-01-10 19:00:37 -06:00
persistent_dictionary.cc
persistent_dictionary.h perf: avoid duplicate calculations in gin_helper::Dictionary getters (#43073) 2024-07-29 12:43:28 -05:00
pinnable.h chore: more iwyu (#43063) 2024-07-29 12:42:57 -05:00
promise.cc perf: avoid redundant Promise.GetContext calls (#43620) 2024-09-08 10:37:42 -05:00
promise.h perf: avoid redundant Promise.GetContext calls (#43620) 2024-09-08 10:37:42 -05:00
trackable_object.cc chore: fix clang-tidy warnings (#38079) 2023-04-26 10:09:54 -04:00
trackable_object.h refactor: KeyWeakMap cleanup (#41242) 2024-02-06 09:18:05 -06:00
wrappable.cc chore: more iwyu (#43063) 2024-07-29 12:42:57 -05:00
wrappable.h chore: bump chromium to 111.0.5544.3 (main) (#36820) 2023-02-03 12:43:42 +01:00
wrappable_base.h chore: more iwyu (#43063) 2024-07-29 12:42:57 -05:00