From d9f6f7dfd315fa3f4789c24426d57614641ba0da Mon Sep 17 00:00:00 2001 From: KuoE0 Date: Wed, 15 Mar 2017 12:08:32 +0800 Subject: [PATCH] Bug 1342863 - (Part 4) DocGroup labeling for runnables dispatched by NS_DispatchTo(Main|Current)Thread in nsDocumentViewer. r=dholbert MozReview-Commit-ID: 9f32OTpim7V --HG-- extra : rebase_source : 58312504c810d3efafa87e36a70fb176f4dedc69 --- layout/base/nsDocumentViewer.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/layout/base/nsDocumentViewer.cpp b/layout/base/nsDocumentViewer.cpp index 5b363899116d..2abdeaa14a35 100644 --- a/layout/base/nsDocumentViewer.cpp +++ b/layout/base/nsDocumentViewer.cpp @@ -2135,7 +2135,11 @@ nsDocumentViewer::Show(void) // Notify observers that a new page has been shown. This will get run // from the event loop after we actually draw the page. - NS_DispatchToMainThread(new nsDocumentShownDispatcher(mDocument)); + RefPtr event = + new nsDocumentShownDispatcher(mDocument); + mDocument->Dispatch("nsDocumentShownDispatcher", + TaskCategory::Other, + event.forget()); return NS_OK; } @@ -4627,4 +4631,3 @@ nsDocumentShownDispatcher::Run() } return NS_OK; } -