Title: [286622] branches/safari-613.1.11-branch/Source/WebKit
Revision
286622
Author
[email protected]
Date
2021-12-07 14:17:49 -0800 (Tue, 07 Dec 2021)

Log Message

Cherry-pick r286563. rdar://problem/86175400

    REGRESSION (r286527): Three API tests crashing under WebKit::ProcessLauncher::launchProcess()
    https://bugs.webkit.org/show_bug.cgi?id=233882
    <rdar://problem/86111726>

    Reviewed by Brent Fulgham.

    Correct the eventHandler to capture the process name, rather than using a raw pointer to the character string.

    * UIProcess/Launcher/cocoa/ProcessLauncherCocoa.mm:
    (WebKit::ProcessLauncher::launchProcess):

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@286563 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Diff

Modified: branches/safari-613.1.11-branch/Source/WebKit/ChangeLog (286621 => 286622)


--- branches/safari-613.1.11-branch/Source/WebKit/ChangeLog	2021-12-07 22:06:29 UTC (rev 286621)
+++ branches/safari-613.1.11-branch/Source/WebKit/ChangeLog	2021-12-07 22:17:49 UTC (rev 286622)
@@ -1,5 +1,36 @@
 2021-12-07  Russell Epstein  <[email protected]>
 
+        Cherry-pick r286563. rdar://problem/86175400
+
+    REGRESSION (r286527): Three API tests crashing under WebKit::ProcessLauncher::launchProcess()
+    https://bugs.webkit.org/show_bug.cgi?id=233882
+    <rdar://problem/86111726>
+    
+    Reviewed by Brent Fulgham.
+    
+    Correct the eventHandler to capture the process name, rather than using a raw pointer to the character string.
+    
+    * UIProcess/Launcher/cocoa/ProcessLauncherCocoa.mm:
+    (WebKit::ProcessLauncher::launchProcess):
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@286563 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2021-12-06  Brent Fulgham  <[email protected]>
+
+            REGRESSION (r286527): Three API tests crashing under WebKit::ProcessLauncher::launchProcess()
+            https://bugs.webkit.org/show_bug.cgi?id=233882
+            <rdar://problem/86111726>
+
+            Reviewed by Brent Fulgham.
+
+            Correct the eventHandler to capture the process name, rather than using a raw pointer to the character string.
+
+            * UIProcess/Launcher/cocoa/ProcessLauncherCocoa.mm:
+            (WebKit::ProcessLauncher::launchProcess):
+
+2021-12-07  Russell Epstein  <[email protected]>
+
         Cherry-pick r286574. rdar://problem/86174696
 
     Regression(r286505) imported/w3c/web-platform-tests/html/cross-origin-opener-policy/_javascript_-url.https.html is a flaky crash

Modified: branches/safari-613.1.11-branch/Source/WebKit/UIProcess/Launcher/cocoa/ProcessLauncherCocoa.mm (286621 => 286622)


--- branches/safari-613.1.11-branch/Source/WebKit/UIProcess/Launcher/cocoa/ProcessLauncherCocoa.mm	2021-12-07 22:06:29 UTC (rev 286621)
+++ branches/safari-613.1.11-branch/Source/WebKit/UIProcess/Launcher/cocoa/ProcessLauncherCocoa.mm	2021-12-07 22:17:49 UTC (rev 286622)
@@ -239,7 +239,7 @@
 
     xpc_dictionary_set_value(bootstrapMessage.get(), "extra-initialization-data", extraInitializationData.get());
 
-    auto errorHandlerImpl = [weakProcessLauncher = WeakPtr { *this }, listeningPort, name] (xpc_object_t event) {
+    auto errorHandlerImpl = [weakProcessLauncher = WeakPtr { *this }, listeningPort, logName = String(name)] (xpc_object_t event) {
         ASSERT(!event || xpc_get_type(event) == XPC_TYPE_ERROR);
 
         auto processLauncher = weakProcessLauncher.get();
@@ -250,10 +250,13 @@
             return;
 
 #if ERROR_DISABLED
-        UNUSED_PARAM(name);
+        UNUSED_PARAM(logName);
 #endif
 
-        LOG_ERROR("Error while launching %s: %s", name, xpc_dictionary_get_string(event, XPC_ERROR_KEY_DESCRIPTION));
+        if (event)
+            LOG_ERROR("Error while launching %s: %s", logName.utf8().data(), xpc_dictionary_get_string(event, XPC_ERROR_KEY_DESCRIPTION));
+        else
+            LOG_ERROR("Error while launching %s: No xpc_object_t event available.", logName.utf8().data());
 
 #if ASSERT_ENABLED
         mach_port_urefs_t sendRightCount = 0;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to