Unreviewed, rolling out r239524.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 2 Jan 2019 19:40:05 +0000 (19:40 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 2 Jan 2019 19:40:05 +0000 (19:40 +0000)
https://bugs.webkit.org/show_bug.cgi?id=193083

basic browsing seems not to work (Requested by thorton on
#webkit).

Reverted changeset:

"Expand use of sourceApplicationAuditData"
https://bugs.webkit.org/show_bug.cgi?id=192995
https://trac.webkit.org/changeset/239524

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

Source/WTF/ChangeLog
Source/WTF/wtf/Platform.h
Source/WebKit/ChangeLog
Source/WebKit/NetworkProcess/cocoa/NetworkProcessCocoa.mm
Source/WebKit/Platform/IPC/Connection.h
Source/WebKit/Platform/IPC/mac/ConnectionMac.mm
Source/WebKit/WebProcess/WebProcess.cpp
Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm

index 8316c1b..295099b 100644 (file)
@@ -1,3 +1,17 @@
+2019-01-02  Commit Queue  <commit-queue@webkit.org>
+
+        Unreviewed, rolling out r239524.
+        https://bugs.webkit.org/show_bug.cgi?id=193083
+
+        basic browsing seems not to work (Requested by thorton on
+        #webkit).
+
+        Reverted changeset:
+
+        "Expand use of sourceApplicationAuditData"
+        https://bugs.webkit.org/show_bug.cgi?id=192995
+        https://trac.webkit.org/changeset/239524
+
 2018-12-28  Yusuke Suzuki  <yusukesuzuki@slowstart.org>
 
         Add ENABLE_UNIFIED_BUILDS option to cmake ports
index 52b7d2e..9cfc8c1 100644 (file)
 #define HAVE_RSA_PSS 1
 #endif
 
-#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101500) || PLATFORM(IOS_FAMILY)
-#define USE_SOURCE_APPLICATION_AUDIT_DATA 1
-#endif
-
 #if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400) || PLATFORM(IOS) || PLATFORM(IOSMAC)
 #define HAVE_URL_FORMATTING 1
 #endif
index 5c23432..8ab58af 100644 (file)
@@ -1,3 +1,17 @@
+2019-01-02  Commit Queue  <commit-queue@webkit.org>
+
+        Unreviewed, rolling out r239524.
+        https://bugs.webkit.org/show_bug.cgi?id=193083
+
+        basic browsing seems not to work (Requested by thorton on
+        #webkit).
+
+        Reverted changeset:
+
+        "Expand use of sourceApplicationAuditData"
+        https://bugs.webkit.org/show_bug.cgi?id=192995
+        https://trac.webkit.org/changeset/239524
+
 2019-01-01  Jeff Miller  <jeffm@apple.com>
 
         Update user-visible copyright strings to include 2019
index 9f84a6d..1c55779 100644 (file)
@@ -133,14 +133,12 @@ void NetworkProcess::platformInitializeNetworkProcessCocoa(const NetworkProcessC
 
 RetainPtr<CFDataRef> NetworkProcess::sourceApplicationAuditData() const
 {
-#if USE(SOURCE_APPLICATION_AUDIT_DATA)
+#if PLATFORM(IOS_FAMILY) && !PLATFORM(IOSMAC)
+    audit_token_t auditToken;
     ASSERT(parentProcessConnection());
-    if (!parentProcessConnection())
+    if (!parentProcessConnection() || !parentProcessConnection()->getAuditToken(auditToken))
         return nullptr;
-    Optional<audit_token_t> auditToken = parentProcessConnection()->getAuditToken();
-    if (!auditToken)
-        return nullptr;
-    return adoptCF(CFDataCreate(nullptr, (const UInt8*)&*auditToken, sizeof(*auditToken)));
+    return adoptCF(CFDataCreate(nullptr, (const UInt8*)&auditToken, sizeof(auditToken)));
 #else
     return nullptr;
 #endif
index e81e81e..fd0015b 100644 (file)
@@ -137,7 +137,7 @@ public:
     };
     static bool identifierIsValid(Identifier identifier) { return MACH_PORT_VALID(identifier.port); }
     xpc_connection_t xpcConnection() const { return m_xpcConnection.get(); }
-    Optional<audit_token_t> getAuditToken();
+    bool getAuditToken(audit_token_t&);
     pid_t remoteProcessID() const;
 #elif OS(WINDOWS)
     typedef HANDLE Identifier;
index 94cc953..fd286b5 100644 (file)
@@ -603,14 +603,13 @@ IPC::Connection::Identifier Connection::identifier() const
     return Identifier(m_isServer ? m_receivePort : m_sendPort, m_xpcConnection);
 }
 
-Optional<audit_token_t> Connection::getAuditToken()
+bool Connection::getAuditToken(audit_token_t& auditToken)
 {
     if (!m_xpcConnection)
-        return WTF::nullopt;
+        return false;
     
-    audit_token_t auditToken;
     xpc_connection_get_audit_token(m_xpcConnection.get(), &auditToken);
-    return WTFMove(auditToken);
+    return true;
 }
 
 bool Connection::kill()
index dd95677..09cea95 100644 (file)
@@ -401,8 +401,9 @@ void WebProcess::initializeWebProcess(WebProcessCreationParameters&& parameters)
 #endif
 
 #if ENABLE(REMOTE_INSPECTOR) && PLATFORM(COCOA)
-    if (Optional<audit_token_t> auditToken = parentProcessConnection()->getAuditToken()) {
-        RetainPtr<CFDataRef> auditData = adoptCF(CFDataCreate(nullptr, (const UInt8*)&*auditToken, sizeof(*auditToken)));
+    audit_token_t auditToken;
+    if (parentProcessConnection()->getAuditToken(auditToken)) {
+        RetainPtr<CFDataRef> auditData = adoptCF(CFDataCreate(nullptr, (const UInt8*)&auditToken, sizeof(auditToken)));
         Inspector::RemoteInspector::singleton().setParentProcessInformation(WebCore::presentingApplicationPID(), auditData);
     }
 #endif
index 83ab80f..ef32528 100644 (file)
@@ -417,14 +417,12 @@ void WebProcess::platformTerminate()
 
 RetainPtr<CFDataRef> WebProcess::sourceApplicationAuditData() const
 {
-#if USE(SOURCE_APPLICATION_AUDIT_DATA)
+#if PLATFORM(IOS_FAMILY)
+    audit_token_t auditToken;
     ASSERT(parentProcessConnection());
-    if (!parentProcessConnection())
-        return nullptr;
-    Optional<audit_token_t> auditToken = parentProcessConnection()->getAuditToken();
-    if (!auditToken)
+    if (!parentProcessConnection() || !parentProcessConnection()->getAuditToken(auditToken))
         return nullptr;
-    return adoptCF(CFDataCreate(nullptr, (const UInt8*)&*auditToken, sizeof(*auditToken)));
+    return adoptCF(CFDataCreate(nullptr, (const UInt8*)&auditToken, sizeof(auditToken)));
 #else
     return nullptr;
 #endif