Commit c11679da authored by Steve Fink's avatar Steve Fink
Browse files

Bug 1710408 - Do not record JSContext info if the js feature is disabled r=gerald

parent 5126c158
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -4894,7 +4894,7 @@ static void locked_profiler_start(PSLockRef aLock, PowerOfTwo32 aCapacity,
      }
#endif
      lockedThreadData->ReinitializeOnResume();
      if (lockedThreadData->GetJSContext()) {
      if (ActivePS::FeatureJS(aLock) && lockedThreadData->GetJSContext()) {
        profiledThreadData->NotifyReceivedJSContext(0);
      }
    }
@@ -5637,6 +5637,10 @@ void profiler_set_js_context(JSContext* aCx) {
            [&](ThreadRegistration::LockedRWOnThread& aThreadData) {
              aThreadData.SetJSContext(aCx);

              if (!ActivePS::Exists(lock) || !ActivePS::FeatureJS(lock)) {
                return;
              }

              // This call is on-thread, so we can call PollJSSampling() to
              // start JS sampling immediately.
              aThreadData.PollJSSampling();