electron/shell
trop[bot] bce144aaf3
perf: avoid redundant calls to GetView() (#43230)
* perf: avoid double-calls to GetView()

There are a lot of places where we call the virtual method GetView()
twice in succession: the first to check if the view exists, and the
second to use. This PR holds the view in a temp variable instead, e.g.:

if (auto* view = foo->GetView())
  view->DoSomething();

Co-authored-by: Charles Kerr <charles@charleskerr.com>

* perf: avoid discarded GetView() call

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>
2024-08-06 19:23:51 -05:00
..
app chore: fixup gn check when enable_pdf_viewer is false (#41997) 2024-05-03 09:10:36 -05:00
browser perf: avoid redundant calls to GetView() (#43230) 2024-08-06 19:23:51 -05:00
common fix: gin_helper::MicrotasksScope instantiation (#43208) 2024-08-05 10:16:22 -05:00
renderer fix: gin_helper::MicrotasksScope instantiation (#43208) 2024-08-05 10:16:22 -05:00
services/node fix: utilityProcess exit codes (#42395) 2024-06-25 19:01:18 +02:00
utility refactor: run Windows SelectFileDialog out of process (#42826) 2024-07-10 15:35:17 +02:00