Commit 45335d1d authored by Gerald Squelart's avatar Gerald Squelart
Browse files

Bug 1728058 - Remove incorrect MOZ_RELEASE_ASSERT(CorePS::Exists()) on...

Bug 1728058 - Remove incorrect MOZ_RELEASE_ASSERT(CorePS::Exists()) on profiler_register_thread - r=canaltinova

Since bug 1722261, thread registrations are not tied to CorePS anymore, ThreadRegistry stores them in a static list.
Also, profiler_register_thread immediately calls ThreadRegistration::RegisterThread -> ThreadRegistration constructor -> ThreadRegistry::Register, which checks if there is a CorePS before working with it.
So this assertion can safely be removed now.

In rare instances, `CorePS` may not actually exist (profiler not initialized yet, or already shutdown), and this assertion could trigger and report an unimportant crash.

Differential Revision: https://phabricator.services.mozilla.com/D123912
parent fc29f171
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -5348,8 +5348,6 @@ ProfilingStack* profiler_register_thread(const char* aName,
                                         void* aGuessStackTop) {
  DEBUG_LOG("profiler_register_thread(%s)", aName);

  MOZ_RELEASE_ASSERT(CorePS::Exists());

  // This will call `ThreadRegistry::Register()` (see below).
  return ThreadRegistration::RegisterThread(aName, aGuessStackTop);
}