Electron version: tip of tree (358ab79778396c533404652d94a3fc4be688b285).
Platform: Linux

Detected in CI: https://app.circleci.com/pipelines/github/electron/electron/32757/workflows/7653119d-b66b-4c28-a7f0-49a1856b5aeb/jobs/720767/steps

<details>
<summary>ASan report</summary>

```
=================================================================
==551==ERROR: AddressSanitizer: heap-use-after-free on address 0x612000078e58 at pc 0x55a3dc7db807 bp 0x7ffd8b4b5830 sp 0x7ffd8b4b5828
READ of size 8 at 0x612000078e58 thread T0 (electron)
    #0 0x55a3dc7db806 in begin ./../../buildtools/third_party/libc++/trunk/include/vector:1516:30
    #1 0x55a3dc7db806 in begin<std::__1::vector<base::internal::UncheckedObserverAdapter, std::__1::allocator<base::internal::UncheckedObserverAdapter> > &> ./../../base/ranges/ranges.h:44:37
    #2 0x55a3dc7db806 in begin<std::__1::vector<base::internal::UncheckedObserverAdapter, std::__1::allocator<base::internal::UncheckedObserverAdapter> > &> ./../../base/ranges/ranges.h:105:10
    #3 0x55a3dc7db806 in find_if<std::__1::vector<base::internal::UncheckedObserverAdapter, std::__1::allocator<base::internal::UncheckedObserverAdapter> > &, (lambda at ../../base/observer_list.h:284:21), base::identity, std::__1::random_access_iterator_tag> ./../../base/ranges/algorithm.h:482:26
    #4 0x55a3dc7db806 in base::ObserverList<extensions::ExtensionRegistryObserver, false, true, base::internal::UncheckedObserverAdapter>::RemoveObserver(extensions::ExtensionRegistryObserver const*) ./../../base/observer_list.h:283:21
    #5 0x55a3dc88629c in extensions::ProcessManager::Shutdown() ./../../extensions/browser/process_manager.cc:314:24
    #6 0x55a3e0cd7072 in ShutdownFactoriesInOrder ./../../components/keyed_service/core/dependency_manager.cc:128:14
    #7 0x55a3e0cd7072 in DependencyManager::DestroyContextServices(void*) ./../../components/keyed_service/core/dependency_manager.cc:84:3
    #8 0x55a3cf5e6aff in electron::ElectronBrowserContext::~ElectronBrowserContext() ./../../electron/shell/browser/electron_browser_context.cc:160:51
    #9 0x55a3cf5e72cd in electron::ElectronBrowserContext::~ElectronBrowserContext() ./../../electron/shell/browser/electron_browser_context.cc:156:51
    #10 0x55a3cf5f54a9 in operator() ./../../buildtools/third_party/libc++/trunk/include/memory:2378:5
    #11 0x55a3cf5f54a9 in reset ./../../buildtools/third_party/libc++/trunk/include/memory:2633:7
    #12 0x55a3cf5f54a9 in ~unique_ptr ./../../buildtools/third_party/libc++/trunk/include/memory:2587:19
    #13 0x55a3cf5f54a9 in ~pair ./../../buildtools/third_party/libc++/trunk/include/utility:297:29
    #14 0x55a3cf5f54a9 in __destroy<std::__1::pair<const electron::ElectronBrowserContext::PartitionKey, std::__1::unique_ptr<electron::ElectronBrowserContext, std::__1::default_delete<electron::ElectronBrowserContext> > > > ./../../buildtools/third_party/libc++/trunk/include/memory:1787:23
    #15 0x55a3cf5f54a9 in destroy<std::__1::pair<const electron::ElectronBrowserContext::PartitionKey, std::__1::unique_ptr<electron::ElectronBrowserContext, std::__1::default_delete<electron::ElectronBrowserContext> > > > ./../../buildtools/third_party/libc++/trunk/include/memory:1619:14
    #16 0x55a3cf5f54a9 in std::__1::__tree<std::__1::__value_type<electron::ElectronBrowserContext::PartitionKey, std::__1::unique_ptr<electron::ElectronBrowserContext, std::__1::default_delete<electron::ElectronBrowserContext> > >, std::__1::__map_value_compare<electron::ElectronBrowserContext::PartitionKey, std::__1::__value_type<electron::ElectronBrowserContext::PartitionKey, std::__1::unique_ptr<electron::ElectronBrowserContext, std::__1::default_delete<electron::ElectronBrowserContext> > >, std::__1::less<electron::ElectronBrowserContext::PartitionKey>, true>, std::__1::allocator<std::__1::__value_type<electron::ElectronBrowserContext::PartitionKey, std::__1::unique_ptr<electron::ElectronBrowserContext, std::__1::default_delete<electron::ElectronBrowserContext> > > > >::destroy(std::__1::__tree_node<std::__1::__value_type<electron::ElectronBrowserContext::PartitionKey, std::__1::unique_ptr<electron::ElectronBrowserContext, std::__1::default_delete<electron::ElectronBrowserContext> > >, void*>*) ./../../buildtools/third_party/libc++/trunk/include/__tree:1833:9
    #17 0x55a3cf5f5455 in std::__1::__tree<std::__1::__value_type<electron::ElectronBrowserContext::PartitionKey, std::__1::unique_ptr<electron::ElectronBrowserContext, std::__1::default_delete<electron::ElectronBrowserContext> > >, std::__1::__map_value_compare<electron::ElectronBrowserContext::PartitionKey, std::__1::__value_type<electron::ElectronBrowserContext::PartitionKey, std::__1::unique_ptr<electron::ElectronBrowserContext, std::__1::default_delete<electron::ElectronBrowserContext> > >, std::__1::less<electron::ElectronBrowserContext::PartitionKey>, true>, std::__1::allocator<std::__1::__value_type<electron::ElectronBrowserContext::PartitionKey, std::__1::unique_ptr<electron::ElectronBrowserContext, std::__1::default_delete<electron::ElectronBrowserContext> > > > >::destroy(std::__1::__tree_node<std::__1::__value_type<electron::ElectronBrowserContext::PartitionKey, std::__1::unique_ptr<electron::ElectronBrowserContext, std::__1::default_delete<electron::ElectronBrowserContext> > >, void*>*) ./../../buildtools/third_party/libc++/trunk/include/__tree:1831:9
    #18 0x55a3cf5f4b07 in clear ./../../buildtools/third_party/libc++/trunk/include/__tree:1870:5
    #19 0x55a3cf5f4b07 in clear ./../../buildtools/third_party/libc++/trunk/include/map:1309:37
    #20 0x55a3cf5f4b07 in electron::ElectronBrowserMainParts::PostMainMessageLoopRun() ./../../electron/shell/browser/electron_browser_main_parts.cc:522:49
    #21 0x55a3d941dd71 in content::BrowserMainLoop::ShutdownThreadsAndCleanUp() ./../../content/browser/browser_main_loop.cc:1057:13
    #22 0x55a3d942483f in content::BrowserMainRunnerImpl::Shutdown() ./../../content/browser/browser_main_runner_impl.cc:178:17
    #23 0x55a3d9415103 in content::BrowserMain(content::MainFunctionParams const&) ./../../content/browser/browser_main.cc:49:16
    #24 0x55a3d460bcf3 in RunBrowserProcessMain ./../../content/app/content_main_runner_impl.cc:521:10
    #25 0x55a3d460bcf3 in content::ContentMainRunnerImpl::RunServiceManager(content::MainFunctionParams&, bool) ./../../content/app/content_main_runner_impl.cc:1008:10
    #26 0x55a3d460ae56 in content::ContentMainRunnerImpl::Run(bool) ./../../content/app/content_main_runner_impl.cc:883:12
    #27 0x55a3d46033ec in content::RunContentProcess(content::ContentMainParams const&, content::ContentMainRunner*) ./../../content/app/content_main.cc:372:36
    #28 0x55a3d46039ac in content::ContentMain(content::ContentMainParams const&) ./../../content/app/content_main.cc:398:10
    #29 0x55a3cf2b4da0 in main ./../../electron/shell/app/electron_main.cc:233:10
    #30 0x7fb212ab9b96 in __libc_start_main ??:0:0

0x612000078e58 is located 152 bytes inside of 264-byte region [0x612000078dc0,0x612000078ec8)
freed by thread T0 (electron) here:
    #0 0x55a3cf26c4dd in operator delete(void*) /b/s/w/ir/cache/builder/src/third_party/llvm/compiler-rt/lib/asan/asan_new_delete.cpp:160:3
    #1 0x55a3e0ce0beb in operator() ./../../buildtools/third_party/libc++/trunk/include/memory:2378:5
    #2 0x55a3e0ce0beb in reset ./../../buildtools/third_party/libc++/trunk/include/memory:2633:7
    #3 0x55a3e0ce0beb in ~unique_ptr ./../../buildtools/third_party/libc++/trunk/include/memory:2587:19
    #4 0x55a3e0ce0beb in ~pair ./../../buildtools/third_party/libc++/trunk/include/utility:297:29
    #5 0x55a3e0ce0beb in __destroy<std::__1::pair<void *const, std::__1::unique_ptr<KeyedService, std::__1::default_delete<KeyedService> > > > ./../../buildtools/third_party/libc++/trunk/include/memory:1787:23
    #6 0x55a3e0ce0beb in destroy<std::__1::pair<void *const, std::__1::unique_ptr<KeyedService, std::__1::default_delete<KeyedService> > > > ./../../buildtools/third_party/libc++/trunk/include/memory:1619:14
    #7 0x55a3e0ce0beb in erase ./../../buildtools/third_party/libc++/trunk/include/__tree:2519:5
    #8 0x55a3e0ce0beb in erase ./../../buildtools/third_party/libc++/trunk/include/map:1301:56
    #9 0x55a3e0ce0beb in KeyedServiceFactory::Disassociate(void*) ./../../components/keyed_service/core/keyed_service_factory.cc:97:14
    #10 0x55a3e0ce0e77 in KeyedServiceFactory::ContextDestroyed(void*) ./../../components/keyed_service/core/keyed_service_factory.cc:107:3
    #11 0x55a3e0cd7332 in DestroyFactoriesInOrder ./../../components/keyed_service/core/dependency_manager.cc:138:14
    #12 0x55a3e0cd7332 in DependencyManager::DestroyContextServices(void*) ./../../components/keyed_service/core/dependency_manager.cc:86:3
    #13 0x55a3cf5e6aff in electron::ElectronBrowserContext::~ElectronBrowserContext() ./../../electron/shell/browser/electron_browser_context.cc:160:51
    #14 0x55a3cf5e72cd in electron::ElectronBrowserContext::~ElectronBrowserContext() ./../../electron/shell/browser/electron_browser_context.cc:156:51
    #15 0x55a3cf5f54a9 in operator() ./../../buildtools/third_party/libc++/trunk/include/memory:2378:5
    #16 0x55a3cf5f54a9 in reset ./../../buildtools/third_party/libc++/trunk/include/memory:2633:7
    #17 0x55a3cf5f54a9 in ~unique_ptr ./../../buildtools/third_party/libc++/trunk/include/memory:2587:19
    #18 0x55a3cf5f54a9 in ~pair ./../../buildtools/third_party/libc++/trunk/include/utility:297:29
    #19 0x55a3cf5f54a9 in __destroy<std::__1::pair<const electron::ElectronBrowserContext::PartitionKey, std::__1::unique_ptr<electron::ElectronBrowserContext, std::__1::default_delete<electron::ElectronBrowserContext> > > > ./../../buildtools/third_party/libc++/trunk/include/memory:1787:23
    #20 0x55a3cf5f54a9 in destroy<std::__1::pair<const electron::ElectronBrowserContext::PartitionKey, std::__1::unique_ptr<electron::ElectronBrowserContext, std::__1::default_delete<electron::ElectronBrowserContext> > > > ./../../buildtools/third_party/libc++/trunk/include/memory:1619:14
    #21 0x55a3cf5f54a9 in std::__1::__tree<std::__1::__value_type<electron::ElectronBrowserContext::PartitionKey, std::__1::unique_ptr<electron::ElectronBrowserContext, std::__1::default_delete<electron::ElectronBrowserContext> > >, std::__1::__map_value_compare<electron::ElectronBrowserContext::PartitionKey, std::__1::__value_type<electron::ElectronBrowserContext::PartitionKey, std::__1::unique_ptr<electron::ElectronBrowserContext, std::__1::default_delete<electron::ElectronBrowserContext> > >, std::__1::less<electron::ElectronBrowserContext::PartitionKey>, true>, std::__1::allocator<std::__1::__value_type<electron::ElectronBrowserContext::PartitionKey, std::__1::unique_ptr<electron::ElectronBrowserContext, std::__1::default_delete<electron::ElectronBrowserContext> > > > >::destroy(std::__1::__tree_node<std::__1::__value_type<electron::ElectronBrowserContext::PartitionKey, std::__1::unique_ptr<electron::ElectronBrowserContext, std::__1::default_delete<electron::ElectronBrowserContext> > >, void*>*) ./../../buildtools/third_party/libc++/trunk/include/__tree:1833:9
    #22 0x55a3cf5f5431 in std::__1::__tree<std::__1::__value_type<electron::ElectronBrowserContext::PartitionKey, std::__1::unique_ptr<electron::ElectronBrowserContext, std::__1::default_delete<electron::ElectronBrowserContext> > >, std::__1::__map_value_compare<electron::ElectronBrowserContext::PartitionKey, std::__1::__value_type<electron::ElectronBrowserContext::PartitionKey, std::__1::unique_ptr<electron::ElectronBrowserContext, std::__1::default_delete<electron::ElectronBrowserContext> > >, std::__1::less<electron::ElectronBrowserContext::PartitionKey>, true>, std::__1::allocator<std::__1::__value_type<electron::ElectronBrowserContext::PartitionKey, std::__1::unique_ptr<electron::ElectronBrowserContext, std::__1::default_delete<electron::ElectronBrowserContext> > > > >::destroy(std::__1::__tree_node<std::__1::__value_type<electron::ElectronBrowserContext::PartitionKey, std::__1::unique_ptr<electron::ElectronBrowserContext, std::__1::default_delete<electron::ElectronBrowserContext> > >, void*>*) ./../../buildtools/third_party/libc++/trunk/include/__tree:1830:9
    #23 0x55a3cf5f4b07 in clear ./../../buildtools/third_party/libc++/trunk/include/__tree:1870:5
    #24 0x55a3cf5f4b07 in clear ./../../buildtools/third_party/libc++/trunk/include/map:1309:37
    #25 0x55a3cf5f4b07 in electron::ElectronBrowserMainParts::PostMainMessageLoopRun() ./../../electron/shell/browser/electron_browser_main_parts.cc:522:49
    #26 0x55a3d941dd71 in content::BrowserMainLoop::ShutdownThreadsAndCleanUp() ./../../content/browser/browser_main_loop.cc:1057:13
    #27 0x55a3d942483f in content::BrowserMainRunnerImpl::Shutdown() ./../../content/browser/browser_main_runner_impl.cc:178:17
    #28 0x55a3d9415103 in content::BrowserMain(content::MainFunctionParams const&) ./../../content/browser/browser_main.cc:49:16
    #29 0x55a3d460bcf3 in RunBrowserProcessMain ./../../content/app/content_main_runner_impl.cc:521:10
    #30 0x55a3d460bcf3 in content::ContentMainRunnerImpl::RunServiceManager(content::MainFunctionParams&, bool) ./../../content/app/content_main_runner_impl.cc:1008:10
    #31 0x55a3d460ae56 in content::ContentMainRunnerImpl::Run(bool) ./../../content/app/content_main_runner_impl.cc:883:12
    #32 0x55a3d46033ec in content::RunContentProcess(content::ContentMainParams const&, content::ContentMainRunner*) ./../../content/app/content_main.cc:372:36
    #33 0x55a3d46039ac in content::ContentMain(content::ContentMainParams const&) ./../../content/app/content_main.cc:398:10
    #34 0x55a3cf2b4da0 in main ./../../electron/shell/app/electron_main.cc:233:10
    #35 0x7fb212ab9b96 in __libc_start_main ??:0:0

previously allocated by thread T0 (electron) here:
    #0 0x55a3cf26bc7d in operator new(unsigned long) /b/s/w/ir/cache/builder/src/third_party/llvm/compiler-rt/lib/asan/asan_new_delete.cpp:99:3
    #1 0x55a3dc7df243 in extensions::ExtensionRegistryFactory::BuildServiceInstanceFor(content::BrowserContext*) const ./../../extensions/browser/extension_registry_factory.cc:39:10
    #2 0x55a3ee782ef7 in BrowserContextKeyedServiceFactory::BuildServiceInstanceFor(void*) const ./../../components/keyed_service/content/browser_context_keyed_service_factory.cc:95:7
    #3 0x55a3e0cdf63c in KeyedServiceFactory::GetServiceForContext(void*, bool) ./../../components/keyed_service/core/keyed_service_factory.cc:80:15
    #4 0x55a3dc9f344e in extensions::AlarmManager::AlarmManager(content::BrowserContext*) ./../../extensions/browser/api/alarms/alarm_manager.cc:119:36
    #5 0x55a3dca00f31 in extensions::BrowserContextKeyedAPIFactory<extensions::AlarmManager>::BuildServiceInstanceFor(content::BrowserContext*) const ./../../extensions/browser/browser_context_keyed_api_factory.h:137:16
    #6 0x55a3ee782ef7 in BrowserContextKeyedServiceFactory::BuildServiceInstanceFor(void*) const ./../../components/keyed_service/content/browser_context_keyed_service_factory.cc:95:7
    #7 0x55a3e0cdf63c in KeyedServiceFactory::GetServiceForContext(void*, bool) ./../../components/keyed_service/core/keyed_service_factory.cc:80:15
    #8 0x55a3e0cd6a67 in DependencyManager::CreateContextServices(void*, bool) ./../../components/keyed_service/core/dependency_manager.cc:0:0
    #9 0x55a3ee781cca in BrowserContextDependencyManager::DoCreateBrowserContextServices(content::BrowserContext*, bool) ./../../components/keyed_service/content/browser_context_dependency_manager.cc:46:22
    #10 0x55a3cf5e45ef in electron::ElectronBrowserContext::ElectronBrowserContext(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool, base::DictionaryValue) ./../../electron/shell/browser/electron_browser_context.cc:146:11
    #11 0x55a3cf5ea4d1 in electron::ElectronBrowserContext::From(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool, base::DictionaryValue) ./../../electron/shell/browser/electron_browser_context.cc:476:11
    #12 0x55a3cf4411af in electron::api::Session::FromPartition(v8::Isolate*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, base::DictionaryValue) ./../../electron/shell/browser/api/electron_api_session.cc:1128:9
    #13 0x55a3cf4a8923 in electron::api::WebContents::WebContents(v8::Isolate*, gin_helper::Dictionary const&) ./../../electron/shell/browser/api/electron_api_web_contents.cc:688:15
    #14 0x55a3cf4f1d9a in electron::api::WebContents::Create(v8::Isolate*, gin_helper::Dictionary const&) ./../../electron/shell/browser/api/electron_api_web_contents.cc:3757:38
    #15 0x55a3cf542d25 in electron::api::WebContentsView::New(gin_helper::Arguments*, gin_helper::Dictionary const&) ./../../electron/shell/browser/api/electron_api_web_contents_view.cc:116:20
    #16 0x55a3cf544235 in Run ./../../base/callback.h:168:12
    #17 0x55a3cf544235 in gin_helper::WrappableBase* gin_helper::internal::InvokeFactory<gin_helper::Arguments*, gin_helper::Dictionary const&>(gin::Arguments*, base::RepeatingCallback<gin_helper::WrappableBase* (gin_helper::Arguments*, gin_helper::Dictionary const&)> const&) ./../../electron/shell/common/gin_helper/constructor.h:43:19
    #18 0x55a3cf543d5f in void gin_helper::internal::InvokeNew<gin_helper::WrappableBase* (gin_helper::Arguments*, gin_helper::Dictionary const&)>(base::RepeatingCallback<gin_helper::WrappableBase* (gin_helper::Arguments*, gin_helper::Dictionary const&)> const&, v8::Isolate*, gin_helper::Arguments*) ./../../electron/shell/common/gin_helper/constructor.h:132:14
    #19 0x55a3cf32fd47 in Run ./../../base/callback.h:168:12
    #20 0x55a3cf32fd47 in DispatchToCallback ./../../electron/shell/common/gin_helper/function_template.h:228:14
    #21 0x55a3cf32fd47 in gin_helper::Dispatcher<void (v8::Isolate*, gin_helper::Arguments*)>::DispatchToCallback(v8::FunctionCallbackInfo<v8::Value> const&) ./../../electron/shell/common/gin_helper/function_template.h:262:15
    #22 0x55a3d530a61f in v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo) ./../../v8/src/api/api-arguments-inl.h:158:3
    #23 0x55a3d530550a in v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<true>(v8::internal::Isolate*, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::FunctionTemplateInfo>, v8::internal::Handle<v8::internal::Object>, v8::internal::BuiltinArguments) ./../../v8/src/builtins/builtins-api.cc:111:36
    #24 0x55a3d530429e in v8::internal::Builtins::InvokeApiFunction(v8::internal::Isolate*, bool, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::Object>, int, v8::internal::Handle<v8::internal::Object>*, v8::internal::Handle<v8::internal::HeapObject>) ./../../v8/src/builtins/builtins-api.cc:223:16
    #25 0x55a3d5694302 in v8::internal::(anonymous namespace)::Invoke(v8::internal::Isolate*, v8::internal::(anonymous namespace)::InvokeParams const&) ./../../v8/src/execution/execution.cc:275:20
    #26 0x55a3d56975fd in v8::internal::Execution::New(v8::internal::Isolate*, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>, int, v8::internal::Handle<v8::internal::Object>*) ./../../v8/src/execution/execution.cc:486:10
    #27 0x55a3d50e6640 in v8::Function::NewInstanceWithSideEffectType(v8::Local<v8::Context>, int, v8::Local<v8::Value>*, v8::SideEffectType) const ./../../v8/src/api/api.cc:4959:7
    #28 0x55a3cf54244d in electron::api::WebContentsView::Create(v8::Isolate*, gin_helper::Dictionary const&) ./../../electron/shell/browser/api/electron_api_web_contents_view.cc:76:32
    #29 0x55a3cf35cfe5 in electron::api::BrowserWindow::BrowserWindow(gin::Arguments*, gin_helper::Dictionary const&) ./../../electron/shell/browser/api/electron_api_browser_window.cc:70:7
    #30 0x55a3cf363b4d in electron::api::BrowserWindow::New(gin_helper::ErrorThrower, gin::Arguments*) ./../../electron/shell/browser/api/electron_api_browser_window.cc:483:14
    #31 0x55a3cf36538c in Invoke<gin_helper::WrappableBase *(*const &)(gin_helper::ErrorThrower, gin::Arguments *), gin_helper::ErrorThrower, gin::Arguments *> ./../../base/bind_internal.h:393:12
    #32 0x55a3cf36538c in MakeItSo<gin_helper::WrappableBase *(*const &)(gin_helper::ErrorThrower, gin::Arguments *), gin_helper::ErrorThrower, gin::Arguments *> ./../../base/bind_internal.h:637:12
    #33 0x55a3cf36538c in RunImpl<gin_helper::WrappableBase *(*const &)(gin_helper::ErrorThrower, gin::Arguments *), const std::__1::tuple<> &> ./../../base/bind_internal.h:710:12
    #34 0x55a3cf36538c in base::internal::Invoker<base::internal::BindState<gin_helper::WrappableBase* (*)(gin_helper::ErrorThrower, gin::Arguments*)>, gin_helper::WrappableBase* (gin_helper::ErrorThrower, gin::Arguments*)>::Run(base::internal::BindStateBase*, gin_helper::ErrorThrower&&, gin::Arguments*) ./../../base/bind_internal.h:692:12
    #35 0x55a3cf3651b4 in Run ./../../base/callback.h:168:12
    #36 0x55a3cf3651b4 in gin_helper::WrappableBase* gin_helper::internal::InvokeFactory<gin_helper::ErrorThrower, gin::Arguments*>(gin::Arguments*, base::RepeatingCallback<gin_helper::WrappableBase* (gin_helper::ErrorThrower, gin::Arguments*)> const&) ./../../electron/shell/common/gin_helper/constructor.h:43:19

SUMMARY: AddressSanitizer: heap-use-after-free (/home/builduser/project/src/out/Default/electron+0x1d151806)
Shadow bytes around the buggy address:
  0x0c2480007170: 00 00 00 00 00 00 00 00 00 00 00 00 fa fa fa fa
  0x0c2480007180: fa fa fa fa fa fa fa fa fd fd fd fd fd fd fd fd
  0x0c2480007190: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x0c24800071a0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fa
  0x0c24800071b0: fa fa fa fa fa fa fa fa fd fd fd fd fd fd fd fd
=>0x0c24800071c0: fd fd fd fd fd fd fd fd fd fd fd[fd]fd fd fd fd
  0x0c24800071d0: fd fd fd fd fd fd fd fd fd fa fa fa fa fa fa fa
  0x0c24800071e0: fa fa fa fa fa fa fa fa fd fd fd fd fd fd fd fd
  0x0c24800071f0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x0c2480007200: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fa fa
  0x0c2480007210: fa fa fa fa fa fa fa fa 00 00 00 00 00 00 00 00
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07
  Heap left redzone:       fa
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
  Shadow gap:              cc
==551==ABORTING
```

</details>
shell/browser/electron_browser_main_parts.cc
#if defined(USE_AURA)
  wm_state_ = std::make_unique<wm::WMState>();
#endif
#if defined(OS_WIN)
  gfx::win::SetAdjustFontCallback(&AdjustUIFont);
  gfx::win::SetGetMinimumFontSizeCallback(&GetMinimumFontSize);
  wchar_t module_name[MAX_PATH] = {0};
  if (GetModuleFileName(NULL, module_name, base::size(module_name)))
    ui::CursorLoaderWin::SetCursorResourceModule(module_name);
#endif
#if defined(OS_MAC)
  views_delegate_.reset(new ViewsDelegateMac);
#else
  views_delegate_ = std::make_unique<ViewsDelegate>();
#endif
}
void ElectronBrowserMainParts::PreMainMessageLoopRun() {
  
  
  node_bindings_->PrepareMessageLoop();
  node_bindings_->RunMessageLoop();
  
  url::LockSchemeRegistries();
#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
  extensions_client_ = std::make_unique<ElectronExtensionsClient>();
  extensions::ExtensionsClient::Set(extensions_client_.get());
  
  extensions_browser_client_ =
      std::make_unique<ElectronExtensionsBrowserClient>();
  extensions::ExtensionsBrowserClient::Set(extensions_browser_client_.get());