mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 07:42:04 +00:00
Bug 1592797 - Fix MediaKeys linker error exposed with different optimization flags r=edgar
Seeing this linker error when building with optimization flags -O2 and others: .../mozilla-central/dom/media/eme/mediadrm/MediaDrmCDMProxy.cpp:297: error: undefined reference to 'void mozilla::dom::MediaKeys::ResolvePromiseWithResult<bool>(unsigned int, bool const&)' This patch moves the template definition from dom/media/eme/MediaKeys.cpp to dom/media/eme/MediaKeys.h Differential Revision: https://phabricator.services.mozilla.com/D51188 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
ffec9b2750
commit
603b880e70
@ -569,16 +569,6 @@ void MediaKeys::OnSessionLoaded(PromiseId aId, bool aSuccess) {
|
||||
ResolvePromiseWithResult(aId, aSuccess);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void MediaKeys::ResolvePromiseWithResult(PromiseId aId, const T& aResult) {
|
||||
RefPtr<DetailedPromise> promise(RetrievePromise(aId));
|
||||
if (!promise) {
|
||||
return;
|
||||
}
|
||||
|
||||
promise->MaybeResolve(aResult);
|
||||
}
|
||||
|
||||
void MediaKeys::OnSessionClosed(MediaKeySession* aSession) {
|
||||
nsAutoString id;
|
||||
aSession->GetSessionId(id);
|
||||
|
@ -149,7 +149,13 @@ class MediaKeys final : public nsIDocumentActivity,
|
||||
dom::MediaKeyStatus aMediaKeyStatus);
|
||||
|
||||
template <typename T>
|
||||
void ResolvePromiseWithResult(PromiseId aId, const T& aResult);
|
||||
void ResolvePromiseWithResult(PromiseId aId, const T& aResult) {
|
||||
RefPtr<DetailedPromise> promise(RetrievePromise(aId));
|
||||
if (!promise) {
|
||||
return;
|
||||
}
|
||||
promise->MaybeResolve(aResult);
|
||||
}
|
||||
|
||||
private:
|
||||
// Instantiate CDMProxy instance.
|
||||
|
Loading…
Reference in New Issue
Block a user