mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-13 21:35:39 +00:00
Bug 1109216 - Chain MediaOmxReader::ReleaseDecoder off MediaDecoderReader::Shutdown resolution. r=cpearce
This commit is contained in:
parent
da72b3891c
commit
f99391c4c3
@ -184,9 +184,11 @@ MediaOmxReader::Shutdown()
|
||||
|
||||
nsRefPtr<ShutdownPromise> p = MediaDecoderReader::Shutdown();
|
||||
|
||||
nsCOMPtr<nsIRunnable> event =
|
||||
NS_NewRunnableMethod(this, &MediaOmxReader::ReleaseDecoder);
|
||||
NS_DispatchToMainThread(event);
|
||||
// Wait for the superclass to finish tearing things down before releasing
|
||||
// the decoder on the main thread.
|
||||
nsCOMPtr<nsIThread> mt;
|
||||
NS_GetMainThread(getter_AddRefs(mt));
|
||||
p->Then(mt.get(), __func__, this, &MediaOmxReader::ReleaseDecoder, &MediaOmxReader::ReleaseDecoder);
|
||||
|
||||
return p;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user