Title: [272068] trunk/Source/WebKit
Revision
272068
Author
[email protected]
Date
2021-01-29 11:14:39 -0800 (Fri, 29 Jan 2021)

Log Message

Unreviewed, reverting r272020 and r272034.
https://bugs.webkit.org/show_bug.cgi?id=221144

Revert potentially related change while investigating crash

Reverted changesets:

"[macOS] WebProcess::updateProcessName should initiate network
process connection if none exists"
https://bugs.webkit.org/show_bug.cgi?id=221094
https://trac.webkit.org/changeset/272020

"Unreviewed macOS build fix after r272020."
https://trac.webkit.org/changeset/272034

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (272067 => 272068)


--- trunk/Source/WebKit/ChangeLog	2021-01-29 19:07:57 UTC (rev 272067)
+++ trunk/Source/WebKit/ChangeLog	2021-01-29 19:14:39 UTC (rev 272068)
@@ -1,3 +1,20 @@
+2021-01-29  Commit Queue  <[email protected]>
+
+        Unreviewed, reverting r272020 and r272034.
+        https://bugs.webkit.org/show_bug.cgi?id=221144
+
+        Revert potentially related change while investigating crash
+
+        Reverted changesets:
+
+        "[macOS] WebProcess::updateProcessName should initiate network
+        process connection if none exists"
+        https://bugs.webkit.org/show_bug.cgi?id=221094
+        https://trac.webkit.org/changeset/272020
+
+        "Unreviewed macOS build fix after r272020."
+        https://trac.webkit.org/changeset/272034
+
 2021-01-29  Per Arne  <[email protected]>
 
         [macOS] Add reporting for some syscalls

Modified: trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm (272067 => 272068)


--- trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm	2021-01-29 19:07:57 UTC (rev 272067)
+++ trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm	2021-01-29 19:14:39 UTC (rev 272068)
@@ -467,15 +467,19 @@
     }
 
 #if ENABLE(SET_WEBCONTENT_PROCESS_INFORMATION_IN_NETWORK_PROCESS)
+    if (!m_networkProcessConnection) {
+        WTFLogAlways("Unable to update process name since there is no Network process connection.");
+        return;
+    }
     audit_token_t auditToken = { 0 };
     mach_msg_type_number_t info_size = TASK_AUDIT_TOKEN_COUNT;
-    kern_return_t kr = task_info(mach_task_self(), TASK_AUDIT_TOKEN, reinterpret_cast<integer_t *>(&auditToken), &info_size);
-    if (kr != KERN_SUCCESS) {
-        RELEASE_LOG_ERROR_IF_ALLOWED(Process, "updateProcessName: Unable to get audit token for self. Error: %{public}s (%x)", mach_error_string(kr), kr);
+    kern_return_t err = task_info(mach_task_self(), TASK_AUDIT_TOKEN, reinterpret_cast<integer_t *>(&auditToken), &info_size);
+    if (err != KERN_SUCCESS) {
+        WTFLogAlways("Unable to get audit token for self: 0x%x", err);
         return;
     }
     String displayName = applicationName.get();
-    ensureNetworkProcessConnection().connection().send(Messages::NetworkConnectionToWebProcess::UpdateActivePages(displayName, Vector<String>(), auditToken), 0);
+    m_networkProcessConnection->connection().send(Messages::NetworkConnectionToWebProcess::UpdateActivePages(displayName, Vector<String>(), auditToken), 0);
 #else
     RunLoop::main().dispatch([this, applicationName = WTFMove(applicationName)] {
         // Note that it is important for _RegisterApplication() to have been called before setting the display name.
@@ -752,15 +756,19 @@
 {
 #if PLATFORM(MAC)
 #if ENABLE(SET_WEBCONTENT_PROCESS_INFORMATION_IN_NETWORK_PROCESS)
+    if (!m_networkProcessConnection) {
+        WTFLogAlways("Unable to update active pages since there is no Network process connection.");
+        return;
+    }
     audit_token_t auditToken = { 0 };
     mach_msg_type_number_t info_size = TASK_AUDIT_TOKEN_COUNT;
-    kern_return_t kr = task_info(mach_task_self(), TASK_AUDIT_TOKEN, reinterpret_cast<integer_t *>(&auditToken), &info_size);
-    if (kr != KERN_SUCCESS) {
-        RELEASE_LOG_ERROR_IF_ALLOWED(Process, "updateActivePages: Unable to get audit token for self. Error: %{public}s (%x)", mach_error_string(kr), kr);
+    kern_return_t err = task_info(mach_task_self(), TASK_AUDIT_TOKEN, reinterpret_cast<integer_t *>(&auditToken), &info_size);
+    if (err != KERN_SUCCESS) {
+        WTFLogAlways("Unable to get audit token for self: 0x%x", err);
         return;
     }
 
-    ensureNetworkProcessConnection().connection().send(Messages::NetworkConnectionToWebProcess::UpdateActivePages(overrideDisplayName, activePagesOrigins(m_pageMap), auditToken), 0);
+    m_networkProcessConnection->connection().send(Messages::NetworkConnectionToWebProcess::UpdateActivePages(overrideDisplayName, activePagesOrigins(m_pageMap), auditToken), 0);
 #else
     if (!overrideDisplayName) {
         RunLoop::main().dispatch([activeOrigins = activePagesOrigins(m_pageMap)] {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to