Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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

Canonical link: https://commits.webkit.org/207603@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239572 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
webkit-commit-queue committed Jan 2, 2019
1 parent e21bcc8 commit a6c45de
Show file tree
Hide file tree
Showing 8 changed files with 43 additions and 23 deletions.
14 changes: 14 additions & 0 deletions Source/WTF/ChangeLog
@@ -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
Expand Down
4 changes: 0 additions & 4 deletions Source/WTF/wtf/Platform.h
Expand Up @@ -1359,10 +1359,6 @@
#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
Expand Down
14 changes: 14 additions & 0 deletions Source/WebKit/ChangeLog
@@ -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
Expand Down
10 changes: 4 additions & 6 deletions Source/WebKit/NetworkProcess/cocoa/NetworkProcessCocoa.mm
Expand Up @@ -133,14 +133,12 @@ static void initializeNetworkSettings()

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
Expand Down
2 changes: 1 addition & 1 deletion Source/WebKit/Platform/IPC/Connection.h
Expand Up @@ -137,7 +137,7 @@ class Connection : public ThreadSafeRefCounted<Connection, WTF::DestructionThrea
};
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;
Expand Down
7 changes: 3 additions & 4 deletions Source/WebKit/Platform/IPC/mac/ConnectionMac.mm
Expand Up @@ -603,14 +603,13 @@ void watchdogTimerFired()
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()
Expand Down
5 changes: 3 additions & 2 deletions Source/WebKit/WebProcess/WebProcess.cpp
Expand Up @@ -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
Expand Down
10 changes: 4 additions & 6 deletions Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm
Expand Up @@ -417,14 +417,12 @@ static void registerWithAccessibility()

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
Expand Down

0 comments on commit a6c45de

Please sign in to comment.