mirror of
https://github.com/roytam1/UXP.git
synced 2026-05-26 14:54:25 +00:00
[DOM] Do not interrupt worker execution if already scheduled.
This commit is contained in:
@@ -1477,6 +1477,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 ||
|
||||
@@ -1495,6 +1499,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