Title: [245992] trunk/Source/WebKit
Revision
245992
Author
cdu...@apple.com
Date
2019-05-31 16:10:27 -0700 (Fri, 31 May 2019)

Log Message

Unreviewed, rolling out r245899.

Seems to be causing crashes on iosmac

Reverted changeset:

"[iOS] UIProcess' background task expiration handler may get
called after the app is foreground again"
https://bugs.webkit.org/show_bug.cgi?id=198380
https://trac.webkit.org/changeset/245899

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (245991 => 245992)


--- trunk/Source/WebKit/ChangeLog	2019-05-31 22:53:40 UTC (rev 245991)
+++ trunk/Source/WebKit/ChangeLog	2019-05-31 23:10:27 UTC (rev 245992)
@@ -1,3 +1,16 @@
+2019-05-31  Chris Dumez  <cdu...@apple.com>
+
+        Unreviewed, rolling out r245899.
+
+        Seems to be causing crashes on iosmac
+
+        Reverted changeset:
+
+        "[iOS] UIProcess' background task expiration handler may get
+        called after the app is foreground again"
+        https://bugs.webkit.org/show_bug.cgi?id=198380
+        https://trac.webkit.org/changeset/245899
+
 2019-05-31  Ryosuke Niwa  <rn...@webkit.org>
 
         iOS: Main frame should be scrollable when pinch zoomed or software keyboard is up

Modified: trunk/Source/WebKit/UIProcess/ios/ProcessAssertionIOS.mm (245991 => 245992)


--- trunk/Source/WebKit/UIProcess/ios/ProcessAssertionIOS.mm	2019-05-31 22:53:40 UTC (rev 245991)
+++ trunk/Source/WebKit/UIProcess/ios/ProcessAssertionIOS.mm	2019-05-31 23:10:27 UTC (rev 245992)
@@ -150,17 +150,7 @@
         }
         RELEASE_LOG(ProcessSuspension, "%p - WKProcessAssertionBackgroundTaskManager - beginBackgroundTaskWithName", self);
         _backgroundTask = [[UIApplication sharedApplication] beginBackgroundTaskWithName:@"com.apple.WebKit.ProcessAssertion" expirationHandler:^{
-            RELEASE_LOG_ERROR(ProcessSuspension, "Background task expired while holding WebKit ProcessAssertion (isMainThread? %d, applicationIsBackgrounded? %d).", RunLoop::isMain(), _applicationIsBackgrounded);
-            if (!_applicationIsBackgrounded) {
-                // We've received the invalidation warning after the app has become foreground again. In this case, we should not warn clients of imminent suspension.
-                // To be safe (avoid potential killing), we end the task right away and call _updateBackgroundTask asynchronously to start a new task if necessary.
-                [self _cancelPendingReleaseTask];
-                [self _releaseBackgroundTask];
-                dispatch_async(dispatch_get_main_queue(), ^{
-                    [self _updateBackgroundTask];
-                });
-                return;
-            }
+            RELEASE_LOG_ERROR(ProcessSuspension, "Background task expired while holding WebKit ProcessAssertion (isMainThread? %d).", RunLoop::isMain());
             // The expiration handler gets called on a non-main thread when the underlying assertion could not be taken (rdar://problem/27278419).
             if (RunLoop::isMain())
                 [self _notifyAssertionsOfImminentSuspension];
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to