Bug 1356249 - Fix assertion in profiler_set_frame_number(). r=mstange.

This function can run off the main thread when 'layers.frame-counter' is
enabled.

--HG--
extra : rebase_source : f3db0fd01c636d5af97109761bb0b57b57c79293
This commit is contained in:
Nicholas Nethercote 2017-04-18 14:40:00 +10:00
parent 6a3359a108
commit 4a55f047a5

View File

@ -2675,7 +2675,8 @@ profiler_is_active()
void
profiler_set_frame_number(int aFrameNumber)
{
MOZ_RELEASE_ASSERT(NS_IsMainThread());
// This function runs both on (via tests) and off the main thread.
MOZ_RELEASE_ASSERT(gPS);
PS::AutoLock lock(gPSMutex);