Bug 1943789 - Remove sleep so UI doesn't freeze r=stransky
Differential Revision: https://phabricator.services.mozilla.com/D237002
This commit is contained in:
@@ -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");
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user