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

Changeset 286563 in webkit


Ignore:
Timestamp:
Dec 6, 2021, 1:03:27 PM (5 years ago)
Author:
Brent Fulgham
Message:

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):

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r286557 r286563  
     12021-12-06  Brent Fulgham  <bfulgham@apple.com>
     2
     3        REGRESSION (r286527): Three API tests crashing under WebKit::ProcessLauncher::launchProcess()
     4        https://bugs.webkit.org/show_bug.cgi?id=233882
     5        <rdar://problem/86111726>
     6
     7        Reviewed by Brent Fulgham.
     8
     9        Correct the eventHandler to capture the process name, rather than using a raw pointer to the character string.
     10
     11        * UIProcess/Launcher/cocoa/ProcessLauncherCocoa.mm:
     12        (WebKit::ProcessLauncher::launchProcess):
     13
    1142021-12-06  Per Arne Vollan  <pvollan@apple.com>
    215
  • trunk/Source/WebKit/UIProcess/Launcher/cocoa/ProcessLauncherCocoa.mm

    r286527 r286563  
    240240    xpc_dictionary_set_value(bootstrapMessage.get(), "extra-initialization-data", extraInitializationData.get());
    241241
    242     auto errorHandlerImpl = [weakProcessLauncher = WeakPtr { *this }, listeningPort, name] (xpc_object_t event) {
     242    auto errorHandlerImpl = [weakProcessLauncher = WeakPtr { *this }, listeningPort, logName = String(name)] (xpc_object_t event) {
    243243        ASSERT(!event || xpc_get_type(event) == XPC_TYPE_ERROR);
    244244
     
    251251
    252252#if ERROR_DISABLED
    253         UNUSED_PARAM(name);
    254 #endif
    255 
    256         LOG_ERROR("Error while launching %s: %s", name, xpc_dictionary_get_string(event, XPC_ERROR_KEY_DESCRIPTION));
     253        UNUSED_PARAM(logName);
     254#endif
     255
     256        if (event)
     257            LOG_ERROR("Error while launching %s: %s", logName.utf8().data(), xpc_dictionary_get_string(event, XPC_ERROR_KEY_DESCRIPTION));
     258        else
     259            LOG_ERROR("Error while launching %s: No xpc_object_t event available.", logName.utf8().data());
    257260
    258261#if ASSERT_ENABLED
Note: See TracChangeset for help on using the changeset viewer.