Skip to content

Commit

Permalink
Bump process priority during WebPageProxy::getContentsAsAttributedStr…
Browse files Browse the repository at this point in the history
…ing()

https://bugs.webkit.org/show_bug.cgi?id=259294
rdar://110464974

Reviewed by Brent Fulgham.

Bump process priority during WebPageProxy::getContentsAsAttributedString() so
that the app doesn't hang waiting for a reply if the view is background.

* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::getContentsAsAttributedString):

Canonical link: https://commits.webkit.org/266115@main
  • Loading branch information
cdumez committed Jul 17, 2023
1 parent 517e213 commit 886fe1f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Source/WebKit/UIProcess/WebPageProxy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5073,7 +5073,9 @@ void WebPageProxy::getContentsAsAttributedString(CompletionHandler<void(const We
return;
}

sendWithAsyncReply(Messages::WebPage::GetContentsAsAttributedString(), WTFMove(completionHandler));
sendWithAsyncReply(Messages::WebPage::GetContentsAsAttributedString(), [completionHandler = WTFMove(completionHandler), activity = process().throttler().foregroundActivity("getContentsAsAttributedString"_s)](const WebCore::AttributedString& string) mutable {
completionHandler(string);
});
}
#endif

Expand Down

0 comments on commit 886fe1f

Please sign in to comment.