Bug 1323100 - Stop double-registering the Media_Encoder thread with the profiler. r=froydnj

MozReview-Commit-ID: 8TQMVhbw13s

--HG--
extra : rebase_source : b2a55afe65d9a68d1d20d08806cb016ce040d044
This commit is contained in:
Markus Stange 2016-12-21 23:06:56 +01:00
Родитель 942cdc08a8
Коммит 927eee33e9
1 изменённых файлов: 0 добавлений и 11 удалений

Просмотреть файл

@ -283,8 +283,6 @@ class MediaRecorder::Session: public nsIObserver,
} else {
// Flush out remaining encoded data.
mSession->Extract(true);
if (mSession->mIsRegisterProfiler)
profiler_unregister_thread();
if (NS_FAILED(NS_DispatchToMainThread(
new DestroyRunnable(mSession)))) {
MOZ_ASSERT(false, "NS_DispatchToMainThread DestroyRunnable failed");
@ -419,7 +417,6 @@ public:
, mTimeSlice(aTimeSlice)
, mStopIssued(false)
, mIsStartEventFired(false)
, mIsRegisterProfiler(false)
, mNeedSessionEndTask(true)
, mSelectedVideoTrackID(TRACK_NONE)
{
@ -607,12 +604,6 @@ private:
MOZ_ASSERT(NS_GetCurrentThread() == mReadThread);
LOG(LogLevel::Debug, ("Session.Extract %p", this));
if (!mIsRegisterProfiler) {
char aLocal;
profiler_register_thread("Media_Encoder", &aLocal);
mIsRegisterProfiler = true;
}
PROFILER_LABEL("MediaRecorder", "Session Extract",
js::ProfileEntry::Category::OTHER);
@ -922,8 +913,6 @@ private:
bool mStopIssued;
// Indicate the session had fire start event. Encoding thread only.
bool mIsStartEventFired;
// The register flag for "Media_Encoder" thread to profiler
bool mIsRegisterProfiler;
// False if the InitEncoder called successfully, ensure the
// ExtractRunnable/DestroyRunnable will end the session.
// Main thread only.