зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1342872 - part1: Label the runnable dispatched by NS_DispatchToCurrentThread in nsPrintEngine r=bevistseng,jwatt
MozReview-Commit-ID: BZhRUglmbMW --HG-- extra : rebase_source : 6280fbd5d1c3d4c47c7fd925abfd9e00384b1ab6
This commit is contained in:
Родитель
5d99fc5820
Коммит
6bb21eacb6
|
@ -3556,9 +3556,15 @@ private:
|
|||
void
|
||||
nsPrintEngine::FirePrintCompletionEvent()
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
nsCOMPtr<nsIRunnable> event = new nsPrintCompletionEvent(mDocViewerPrint);
|
||||
if (NS_FAILED(NS_DispatchToCurrentThread(event)))
|
||||
NS_WARNING("failed to dispatch print completion event");
|
||||
nsCOMPtr<nsIContentViewer> cv = do_QueryInterface(mDocViewerPrint);
|
||||
NS_ENSURE_TRUE_VOID(cv);
|
||||
nsCOMPtr<nsIDocument> doc = cv->GetDocument();
|
||||
NS_ENSURE_TRUE_VOID(doc);
|
||||
|
||||
NS_ENSURE_SUCCESS_VOID(doc->Dispatch("nsPrintCompletionEvent",
|
||||
TaskCategory::Other, event.forget()));
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Загрузка…
Ссылка в новой задаче