зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1426578. P5 - offload Init() to another thread. r=bechen,gerald
MozReview-Commit-ID: Fv7eq39GNsk --HG-- extra : rebase_source : 483cd70c65a4f724b40aaa11eece60b6a2a85e25 extra : source : db2632bf1828721b94bda877bf23bc59d189206e
This commit is contained in:
Родитель
ea7483e4ce
Коммит
bb6429d366
|
@ -2868,8 +2868,13 @@ MediaCacheStream::Init(int64_t aContentLength)
|
|||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
AutoLock lock(mMediaCache->Monitor());
|
||||
mMediaCache->OpenStream(lock, this);
|
||||
OwnerThread()->Dispatch(NS_NewRunnableFunction(
|
||||
"MediaCacheStream::Init",
|
||||
[ this, res = RefPtr<ChannelMediaResource>(mClient) ]() {
|
||||
AutoLock lock(mMediaCache->Monitor());
|
||||
mMediaCache->OpenStream(lock, this);
|
||||
}));
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче