mirror of
https://github.com/roytam1/basilisk55.git
synced 2026-05-26 15:02:46 +00:00
import from UXP: [DOM] Do not interrupt worker execution if already scheduled. (bf526d70)
This commit is contained in:
@@ -1474,6 +1474,10 @@ CachePromiseHandler::ResolvedCallback(JSContext* aCx,
|
||||
JS::Handle<JS::Value> aValue)
|
||||
{
|
||||
AssertIsOnMainThread();
|
||||
// If execution is already schuled, bail.
|
||||
if (mLoadInfo.mExecutionScheduled) {
|
||||
return;
|
||||
}
|
||||
// May already have been canceled by CacheScriptLoader::Fail from
|
||||
// CancelMainThread.
|
||||
MOZ_ASSERT(mLoadInfo.mCacheStatus == ScriptLoadInfo::WritingToCache ||
|
||||
@@ -1492,6 +1496,10 @@ CachePromiseHandler::RejectedCallback(JSContext* aCx,
|
||||
JS::Handle<JS::Value> aValue)
|
||||
{
|
||||
AssertIsOnMainThread();
|
||||
// If execution is already schuled, bail.
|
||||
if (mLoadInfo.mExecutionScheduled) {
|
||||
return;
|
||||
}
|
||||
// May already have been canceled by CacheScriptLoader::Fail from
|
||||
// CancelMainThread.
|
||||
MOZ_ASSERT(mLoadInfo.mCacheStatus == ScriptLoadInfo::WritingToCache ||
|
||||
|
||||
Reference in New Issue
Block a user