Bug 1943789 - Remove sleep so UI doesn't freeze r=stransky

Differential Revision: https://phabricator.services.mozilla.com/D237002
This commit is contained in:
jonath4n
2025-02-07 11:15:12 +00:00
parent a458fbcccc
commit d0321c7664
2 changed files with 0 additions and 3 deletions

View File

@@ -61,8 +61,6 @@ ClipboardData nsRetrievalContextWayland::WaitForClipboardData(
PRTime entryTime = PR_Now(); PRTime entryTime = PR_Now();
while (!request.HasCompleted()) { while (!request.HasCompleted()) {
if (iteration++ > kClipboardFastIterationNum) { if (iteration++ > kClipboardFastIterationNum) {
/* sleep for 10 ms/iteration */
PR_Sleep(PR_MillisecondsToInterval(10));
if (PR_Now() - entryTime > kClipboardTimeout) { if (PR_Now() - entryTime > kClipboardTimeout) {
MOZ_CLIPBOARD_LOG( MOZ_CLIPBOARD_LOG(
" failed to get async clipboard data in time limit\n"); " failed to get async clipboard data in time limit\n");

View File

@@ -1452,7 +1452,6 @@ RefPtr<DragData> nsDragSession::GetDragData(GdkAtom aRequestedFlavor) {
// check the number of iterations // check the number of iterations
LOGDRAGSERVICE(" doing iteration, mWaitingForDragDataRequests %d ...", LOGDRAGSERVICE(" doing iteration, mWaitingForDragDataRequests %d ...",
mWaitingForDragDataRequests); mWaitingForDragDataRequests);
PR_Sleep(PR_MillisecondsToInterval(10)); /* sleep for 10 ms/iteration */
if (PR_Now() - entryTime > NS_DND_TIMEOUT) { if (PR_Now() - entryTime > NS_DND_TIMEOUT) {
LOGDRAGSERVICE(" failed to get D&D data in time!\n"); LOGDRAGSERVICE(" failed to get D&D data in time!\n");
break; break;