Bug 1539884 - Part 27: Mark nsImageBoxFrameEvent::Run as CAN_RUN_SCRIPT_BOUNDARY r=masayuki

Differential Revision: https://phabricator.services.mozilla.com/D134405
This commit is contained in:
Kagami Sascha Rosylight 2021-12-23 16:27:22 +00:00
Родитель 8df5508482
Коммит 4f6c87ece4
1 изменённых файлов: 6 добавлений и 6 удалений

Просмотреть файл

@ -82,14 +82,14 @@ class nsImageBoxFrameEvent : public Runnable {
NS_IMETHOD Run() override;
private:
nsCOMPtr<nsIContent> mContent;
const nsCOMPtr<nsIContent> mContent;
EventMessage mMessage;
};
NS_IMETHODIMP
nsImageBoxFrameEvent::Run() {
RefPtr<nsPresContext> pres_context = mContent->OwnerDoc()->GetPresContext();
if (!pres_context) {
// TODO: Convert this to MOZ_CAN_RUN_SCRIPT (bug 1415230, bug 1535398)
MOZ_CAN_RUN_SCRIPT_BOUNDARY NS_IMETHODIMP nsImageBoxFrameEvent::Run() {
RefPtr<nsPresContext> presContext = mContent->OwnerDoc()->GetPresContext();
if (!presContext) {
return NS_OK;
}
@ -97,7 +97,7 @@ nsImageBoxFrameEvent::Run() {
WidgetEvent event(true, mMessage);
event.mFlags.mBubbles = false;
EventDispatcher::Dispatch(mContent, pres_context, &event, nullptr, &status);
EventDispatcher::Dispatch(mContent, presContext, &event, nullptr, &status);
return NS_OK;
}