Title: [261423] trunk/Source/WebKit
Revision
261423
Author
cdu...@apple.com
Date
2020-05-08 16:11:38 -0700 (Fri, 08 May 2020)

Log Message

Regression(r210945): No attachment when sharing to mail
https://bugs.webkit.org/show_bug.cgi?id=211651
<rdar://problem/63040170>

Reviewed by Tim Horton.

When failing to determine foreground state, the code before r210945 was assuming
'foreground', while the code in r210945 assume 'background'. This causes things
to not render properly when we fail to determine the foreground state.

This patch merely restores pre-r210945 behavior. I will investigate why we are
unable to determinate the host application PID for the MailCompositionService.

* UIProcess/ApplicationStateTracker.mm:
(WebKit::isApplicationForeground):

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (261422 => 261423)


--- trunk/Source/WebKit/ChangeLog	2020-05-08 23:11:16 UTC (rev 261422)
+++ trunk/Source/WebKit/ChangeLog	2020-05-08 23:11:38 UTC (rev 261423)
@@ -1,3 +1,21 @@
+2020-05-08  Chris Dumez  <cdu...@apple.com>
+
+        Regression(r210945): No attachment when sharing to mail
+        https://bugs.webkit.org/show_bug.cgi?id=211651
+        <rdar://problem/63040170>
+
+        Reviewed by Tim Horton.
+
+        When failing to determine foreground state, the code before r210945 was assuming
+        'foreground', while the code in r210945 assume 'background'. This causes things
+        to not render properly when we fail to determine the foreground state.
+
+        This patch merely restores pre-r210945 behavior. I will investigate why we are
+        unable to determinate the host application PID for the MailCompositionService.
+
+        * UIProcess/ApplicationStateTracker.mm:
+        (WebKit::isApplicationForeground):
+
 2020-05-08  Nikos Mouchtaris  <nmouchta...@apple.com>
 
         Implement web-share v2 for files

Modified: trunk/Source/WebKit/UIProcess/ApplicationStateTracker.mm (261422 => 261423)


--- trunk/Source/WebKit/UIProcess/ApplicationStateTracker.mm	2020-05-08 23:11:16 UTC (rev 261422)
+++ trunk/Source/WebKit/UIProcess/ApplicationStateTracker.mm	2020-05-08 23:11:38 UTC (rev 261423)
@@ -171,7 +171,9 @@
     RBSProcessIdentifier *processIdentifier = [RBSProcessIdentifier identifierWithPid:pid];
     if (!processIdentifier) {
         RELEASE_LOG_ERROR(ProcessSuspension, "isApplicationForeground: Failed to construct RBSProcessIdentifier from PID %d", pid);
-        return false;
+        // We assume foreground when unable to determine state to maintain pre-existing behavior and to avoid
+        // not rendering anything when we fail.
+        return true;
     }
 
     NSError *error = nil;
@@ -178,7 +180,9 @@
     RBSProcessHandle *processHandle = [RBSProcessHandle handleForIdentifier:processIdentifier error:&error];
     if (!processHandle) {
         RELEASE_LOG_ERROR(ProcessSuspension, "isApplicationForeground: Failed to get RBSProcessHandle for process with PID %d, error: %{public}@", pid, error);
-        return false;
+        // We assume foreground when unable to determine state to maintain pre-existing behavior and to avoid
+        // not rendering anything when we fail.
+        return true;
     }
 
     RBSProcessState *state = processHandle.currentState;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to