Bug 1341200. Part 1 - satisfy least privilege principle by capturing |mSamplesWaitingForKey| instead of |this|. r=jya

MozReview-Commit-ID: A12HdnP8Vbn

--HG--
extra : rebase_source : 67652f72c1bf0644523c6fc122b98e60e406b0c9
extra : intermediate-source : 340ac9187c2771b3a8cc97eafbb4e8ab7da0f226
extra : source : 8f839ee5b13e06ee1b8cf8c4e520865592a953b6
This commit is contained in:
JW Wang 2017-02-22 16:06:14 +08:00
parent e9aad6d3f5
commit 4a63e253b1

View File

@ -172,14 +172,9 @@ public:
holder->DisconnectIfExists();
iter.Remove();
}
RefPtr<EMEDecryptor> self = this;
RefPtr<SamplesWaitingForKey> k = mSamplesWaitingForKey;
return mDecoder->Flush()->Then(mTaskQueue, __func__,
[self, this]() {
mSamplesWaitingForKey->Flush();
},
[self, this]() {
mSamplesWaitingForKey->Flush();
});
[k]() { k->Flush(); });
}
RefPtr<DecodePromise> Drain() override