⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 251627 in webkit


Ignore:
Timestamp:
Oct 25, 2019, 9:53:33 PM (7 years ago)
Author:
Chris Dumez
Message:

REGRESSION(r251599): Crash in MobileSafari tests (ASSERTION FAILED: m_pendingRequestToSuspendID)
https://bugs.webkit.org/show_bug.cgi?id=203437
<rdar://problem/56633399>

Reviewed by Geoffrey Garen.

  • UIProcess/ProcessThrottler.cpp:

(WebKit::ProcessThrottler::updateAssertionIfNeeded):
Start the timer before sending the PrepareToSuspend IPC. The reason is that if the process has been
terminated, the completion handler may run synchronously and cancel the request to suspend / stop
the timer. Therefore, re-starting the timer after would be a mistake.

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r251616 r251627  
     12019-10-25  Chris Dumez  <cdumez@apple.com>
     2
     3        REGRESSION(r251599): Crash in MobileSafari tests (ASSERTION FAILED: m_pendingRequestToSuspendID)
     4        https://bugs.webkit.org/show_bug.cgi?id=203437
     5        <rdar://problem/56633399>
     6
     7        Reviewed by Geoffrey Garen.
     8
     9        * UIProcess/ProcessThrottler.cpp:
     10        (WebKit::ProcessThrottler::updateAssertionIfNeeded):
     11        Start the timer before sending the PrepareToSuspend IPC. The reason is that if the process has been
     12        terminated, the completion handler may run synchronously and cancel the request to suspend / stop
     13        the timer. Therefore, re-starting the timer after would be a mistake.
     14
    1152019-10-25  David Kilzer  <ddkilzer@apple.com>
    216
  • trunk/Source/WebKit/UIProcess/ProcessThrottler.cpp

    r251599 r251627  
    9393        // in the background for too long.
    9494        if (m_assertion->state() != AssertionState::Suspended) {
     95            m_prepareToSuspendTimeoutTimer.startOneShot(processSuspensionTimeout);
    9596            sendPrepareToSuspendIPC(IsSuspensionImminent::No);
    96             m_prepareToSuspendTimeoutTimer.startOneShot(processSuspensionTimeout);
    9797            return;
    9898        }
Note: See TracChangeset for help on using the changeset viewer.