summaryrefslogtreecommitdiffstats
path: root/dom/base
diff options
context:
space:
mode:
Diffstat (limited to 'dom/base')
-rw-r--r--dom/base/CustomElementRegistry.cpp5
-rw-r--r--dom/base/CustomElementRegistry.h10
2 files changed, 7 insertions, 8 deletions
diff --git a/dom/base/CustomElementRegistry.cpp b/dom/base/CustomElementRegistry.cpp
index ab1e60366..55e2d3b30 100644
--- a/dom/base/CustomElementRegistry.cpp
+++ b/dom/base/CustomElementRegistry.cpp
@@ -1019,9 +1019,8 @@ CustomElementReactionsStack::Enqueue(Element* aElement,
}
CycleCollectedJSContext* context = CycleCollectedJSContext::Get();
- RefPtr<ProcessBackupQueueRunnable> processBackupQueueRunnable =
- new ProcessBackupQueueRunnable(this);
- context->DispatchToMicroTask(processBackupQueueRunnable.forget());
+ RefPtr<BackupQueueMicroTask> bqmt = new BackupQueueMicroTask(this);
+ context->DispatchMicroTaskRunnable(bqmt.forget());
}
void
diff --git a/dom/base/CustomElementRegistry.h b/dom/base/CustomElementRegistry.h
index 51c97fd5e..8cea11d1f 100644
--- a/dom/base/CustomElementRegistry.h
+++ b/dom/base/CustomElementRegistry.h
@@ -311,21 +311,21 @@ private:
void Enqueue(Element* aElement, CustomElementReaction* aReaction);
private:
- class ProcessBackupQueueRunnable : public mozilla::Runnable {
+ class BackupQueueMicroTask final : public mozilla::MicroTaskRunnable {
public:
- explicit ProcessBackupQueueRunnable(CustomElementReactionsStack* aReactionStack)
- : mReactionStack(aReactionStack)
+ explicit BackupQueueMicroTask(CustomElementReactionsStack* aReactionStack)
+ : MicroTaskRunnable()
+ , mReactionStack(aReactionStack)
{
MOZ_ASSERT(!mReactionStack->mIsBackupQueueProcessing,
"mIsBackupQueueProcessing should be initially false");
mReactionStack->mIsBackupQueueProcessing = true;
}
- NS_IMETHOD Run() override
+ virtual void Run(AutoSlowOperation& aAso) override
{
mReactionStack->InvokeBackupQueue();
mReactionStack->mIsBackupQueueProcessing = false;
- return NS_OK;
}
private: