electron/shell/common/api
trop[bot] a6b34dca26
perf: prefer NewFromUtf8Literal() over NewFromUtf8() for string literals (#44429)
* perf: prefer NewFromUtf8Literal() over NewFromUtf8() for string literals

the string length is known at compile time and no need to call ToLocalChecked()

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

* perf: string length is known when calling NewFromUtf8(), so use it

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

* perf: remove unnecessary calls to c_str()

these just force the code being called to have to recalculate the string length

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-10-28 11:06:10 -05:00
..
api.mojom chore: bump chromium to 125.0.6412.0 (main) (#41610) 2024-04-15 18:10:32 -04:00
crashpad_support.cc chore: rename built-in modules to bindings to match naming update in node (#37182) 2023-02-09 10:31:38 +09:00
electron_api_asar.cc perf: prefer NewFromUtf8Literal() over NewFromUtf8() for string literals (#44429) 2024-10-28 11:06:10 -05:00
electron_api_clipboard.cc fix: -Wunsafe-buffer-usage warnings in Clipboard::WriteBuffer() (#43813) 2024-09-20 08:47:49 -05:00
electron_api_clipboard.h chore: more iwyu (#43063) 2024-07-29 12:42:57 -05:00
electron_api_clipboard_mac.mm chore: bump chromium to 105.0.5173.0 (main) (#34770) 2022-07-13 17:26:16 -04:00
electron_api_command_line.cc perf: remove unnecessary .c_str() calls (#41869) 2024-04-16 19:48:54 -04:00
electron_api_environment.cc chore: remove unused internal env.unSetVar() (#43148) 2024-08-01 18:41:41 -05:00
electron_api_native_image.cc refactor: spanify image utils (#44178) 2024-10-10 13:24:26 -04:00
electron_api_native_image.h refactor: spanify image utils (#44178) 2024-10-10 13:24:26 -04:00
electron_api_native_image_mac.mm fix: -Wunsafe-buffer-usage warning in didRegisterForRemoteNotificationsWithDeviceToken (#44381) 2024-10-23 20:44:47 -05:00
electron_api_native_image_win.cc refactor: replace remaining NULL with nullptr (#40053) 2023-10-03 12:26:35 -07:00
electron_api_net.cc chore: replace absl::optional<T> with std::optional<T> (#40928) 2024-01-10 16:23:35 -06:00
electron_api_shell.cc chore: more iwyu (#43063) 2024-07-29 12:42:57 -05:00
electron_api_testing.cc chore: bump chromium to 122.0.6261.6 (main) (#40949) 2024-01-25 12:46:30 -05:00
electron_api_url_loader.cc perf: use ArrayBuffer::Data() instead of GetBackingStore()->Data() (#44073) 2024-10-01 13:52:00 -05:00
electron_api_url_loader.h refactor: declare gin::Wrapper subclasses as final (#43565) 2024-09-04 21:26:25 -05:00
electron_api_v8_util.cc chore: remove unused KeyWeakMap JS bindings (#43111) 2024-07-31 16:37:04 -05:00
electron_bindings.cc refactor: reduce code duplication in gin_helper::Promise (33-x-y) (#43778) 2024-09-19 13:01:13 +02:00
electron_bindings.h chore: more iwyu (#43063) 2024-07-29 12:42:57 -05:00
features.cc feat: replace BrowserView with WebContentsView (#35658) 2023-12-13 13:01:03 -08:00