Bug 1376981 - Label nsBindingManager::PostProcessAttachedQueueEvent (r=smaug)

MozReview-Commit-ID: G0xxNwtXsex
This commit is contained in:
Bill McCloskey 2017-06-14 14:24:59 -07:00
parent 4b6dd14d76
commit 5ea47d3cf9

View File

@ -351,11 +351,15 @@ nsBindingManager::AddToAttachedQueue(nsXBLBinding* aBinding)
void
nsBindingManager::PostProcessAttachedQueueEvent()
{
MOZ_ASSERT(NS_IsMainThread());
if (!mDocument) {
return;
}
mProcessAttachedQueueEvent =
NewRunnableMethod("nsBindingManager::DoProcessAttachedQueue",
this, &nsBindingManager::DoProcessAttachedQueue);
nsresult rv = NS_DispatchToCurrentThread(mProcessAttachedQueueEvent);
if (NS_SUCCEEDED(rv) && mDocument) {
nsresult rv = mDocument->EventTargetFor(TaskCategory::Other)->Dispatch(do_AddRef(mProcessAttachedQueueEvent));
if (NS_SUCCEEDED(rv)) {
mDocument->BlockOnload();
}
}