Title: [254536] branches/safari-610.1.1-branch
Revision
254536
Author
[email protected]
Date
2020-01-14 14:35:05 -0800 (Tue, 14 Jan 2020)

Log Message

Revert r254521. rdar://problem/58542040

Modified Paths

Diff

Modified: branches/safari-610.1.1-branch/LayoutTests/ChangeLog (254535 => 254536)


--- branches/safari-610.1.1-branch/LayoutTests/ChangeLog	2020-01-14 22:26:05 UTC (rev 254535)
+++ branches/safari-610.1.1-branch/LayoutTests/ChangeLog	2020-01-14 22:35:05 UTC (rev 254536)
@@ -1,5 +1,9 @@
 2020-01-14  Kocsen Chung  <[email protected]>
 
+        Revert r254521. rdar://problem/58542040
+
+2020-01-14  Kocsen Chung  <[email protected]>
+
         Revert r254392. rdar://problem/58542040
 
 2020-01-10  Yusuke Suzuki  <[email protected]>

Modified: branches/safari-610.1.1-branch/LayoutTests/gpu-process/TestExpectations (254535 => 254536)


--- branches/safari-610.1.1-branch/LayoutTests/gpu-process/TestExpectations	2020-01-14 22:26:05 UTC (rev 254535)
+++ branches/safari-610.1.1-branch/LayoutTests/gpu-process/TestExpectations	2020-01-14 22:35:05 UTC (rev 254536)
@@ -179,14 +179,46 @@
 inspector/layers/layers-compositing-reasons.html [ Skip ]
 
 media [ Skip ]
+media/media-controller.html [ Pass ]
+media/media-preload-no-delay-loadevent.html [ Pass ]
+media/video-src.html [ Pass ]
+media/video-source.html [ Pass ]
+media/audio-as-video-fullscreen.html [ Pass ]
+media/audio-background-playback-playlist.html [ Pass ]
+media/audio-concurrent-supported.html [ Pass ]
+media/audio-constructor-preload.html [ Pass ]
+media/audio-constructor-src.html [ Pass ]
+media/audio-constructor.html [ Pass ]
+media/audio-controls-do-not-fade-out.html [ Pass ]
+media/audio-controls-timeline-in-media-document.html [ Pass ]
+media/audio-dealloc-crash.html [ Pass ]
+media/audio-delete-while-slider-thumb-clicked.html [ Pass ]
+media/audio-garbage-collect.html [ Pass ]
+media/audio-mpeg-supported.html [ Pass ]
+media/audio-mpeg4-supported.html [ Pass ]
+media/audio-no-installed-engines.html [ Pass ]
+media/audio-only-video-intrinsic-size.html [ Pass ]
+media/audio-play-event.html [ Pass ]
 media/audio-play-with-video-element.html [ Pass ]
 media/audio-play.html [ Pass ]
+media/audio-playback-restriction-autoplay.html [ Pass ]
+media/audio-playback-restriction-play-muted.html [ Pass ]
+media/audio-playback-restriction-play.html [ Pass ]
+media/audio-playback-restriction-removed-muted.html [ Pass ]
+media/audio-playback-volume-changes-with-restrictions-and-user-gestures.html [ Pass ]
+media/audio-playback-volume-changes-with-restrictions.html [ Pass ]
+media/deactivate-audio-session.html [ Pass ]
 media/media-can-play-mpeg-audio.html [ Pass ]
 media/media-can-play-wav-audio.html [ Pass ]
-media/media-controller.html [ Pass ]
-media/media-preload-no-delay-loadevent.html [ Pass ]
-media/video-src.html [ Pass ]
-media/video-source.html [ Pass ]
+media/media-document-audio-controls-visible.html [ Pass ]
+media/media-document-audio-repaint.html [ Pass ]
+media/media-document-audio-size.html [ Pass ]
+media/muted-video-is-playing-audio.html [ Pass ]
+media/restricted-audio-playback-with-document-gesture.html [ Pass ]
+media/restricted-audio-playback-with-multiple-settimeouts.html [ Pass ]
+media/video-controls-visible-audio-only.html [ Pass ]
+media/video-play-audio-require-user-gesture.html [ Pass ]
+
 accessibility/media-element.html [ Skip ]
 fast/block/float/list-marker-is-float-crash.html [ Skip ]
 fast/css/relative-position-replaced-in-table-display-crash.html [ Skip ]

Modified: branches/safari-610.1.1-branch/Source/WebKit/ChangeLog (254535 => 254536)


--- branches/safari-610.1.1-branch/Source/WebKit/ChangeLog	2020-01-14 22:26:05 UTC (rev 254535)
+++ branches/safari-610.1.1-branch/Source/WebKit/ChangeLog	2020-01-14 22:35:05 UTC (rev 254536)
@@ -1,5 +1,9 @@
 2020-01-14  Kocsen Chung  <[email protected]>
 
+        Revert r254521. rdar://problem/58542040
+
+2020-01-14  Kocsen Chung  <[email protected]>
+
         Cherry-pick r254433. rdar://problem/58554516
 
     [macCatalyst] UI process crashes on launch after r254101

Modified: branches/safari-610.1.1-branch/Source/WebKit/GPUProcess/GPUProcess.cpp (254535 => 254536)


--- branches/safari-610.1.1-branch/Source/WebKit/GPUProcess/GPUProcess.cpp	2020-01-14 22:26:05 UTC (rev 254535)
+++ branches/safari-610.1.1-branch/Source/WebKit/GPUProcess/GPUProcess.cpp	2020-01-14 22:35:05 UTC (rev 254536)
@@ -35,6 +35,7 @@
 #include "GPUConnectionToWebProcess.h"
 #include "GPUProcessCreationParameters.h"
 #include "Logging.h"
+#include "SandboxExtension.h"
 #include "WebPageProxyMessages.h"
 #include "WebProcessPoolMessages.h"
 #include <WebCore/LogInitialization.h>

Modified: branches/safari-610.1.1-branch/Source/WebKit/GPUProcess/GPUProcess.messages.in (254535 => 254536)


--- branches/safari-610.1.1-branch/Source/WebKit/GPUProcess/GPUProcess.messages.in	2020-01-14 22:26:05 UTC (rev 254535)
+++ branches/safari-610.1.1-branch/Source/WebKit/GPUProcess/GPUProcess.messages.in	2020-01-14 22:35:05 UTC (rev 254536)
@@ -1,4 +1,4 @@
-# Copyright (C) 2019 Apple Inc. All rights reserved.
+# Copyright (C) 2019-2020 Apple Inc. All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
 # modification, are permitted provided that the following conditions

Modified: branches/safari-610.1.1-branch/Source/WebKit/GPUProcess/media/RemoteMediaPlayerManagerProxy.cpp (254535 => 254536)


--- branches/safari-610.1.1-branch/Source/WebKit/GPUProcess/media/RemoteMediaPlayerManagerProxy.cpp	2020-01-14 22:26:05 UTC (rev 254535)
+++ branches/safari-610.1.1-branch/Source/WebKit/GPUProcess/media/RemoteMediaPlayerManagerProxy.cpp	2020-01-14 22:35:05 UTC (rev 254536)
@@ -203,10 +203,10 @@
         player->prepareForPlayback(privateMode, preload, preservesPitch, prepareForRendering);
 }
 
-void RemoteMediaPlayerManagerProxy::load(MediaPlayerPrivateRemoteIdentifier id, URL&& url, WebCore::ContentType&& contentType, String&& keySystem, CompletionHandler<void(RemoteMediaPlayerConfiguration&&)>&& completionHandler)
+void RemoteMediaPlayerManagerProxy::load(MediaPlayerPrivateRemoteIdentifier id, URL&& url, Optional<SandboxExtension::Handle>&& sandboxExtension, WebCore::ContentType&& contentType, String&& keySystem, CompletionHandler<void(RemoteMediaPlayerConfiguration&&)>&& completionHandler)
 {
     if (auto player = m_proxies.get(id))
-        player->load(WTFMove(url), WTFMove(contentType), WTFMove(keySystem), WTFMove(completionHandler));
+        player->load(WTFMove(url), WTFMove(sandboxExtension), WTFMove(contentType), WTFMove(keySystem), WTFMove(completionHandler));
 }
 
 void RemoteMediaPlayerManagerProxy::cancelLoad(MediaPlayerPrivateRemoteIdentifier id)

Modified: branches/safari-610.1.1-branch/Source/WebKit/GPUProcess/media/RemoteMediaPlayerManagerProxy.h (254535 => 254536)


--- branches/safari-610.1.1-branch/Source/WebKit/GPUProcess/media/RemoteMediaPlayerManagerProxy.h	2020-01-14 22:26:05 UTC (rev 254535)
+++ branches/safari-610.1.1-branch/Source/WebKit/GPUProcess/media/RemoteMediaPlayerManagerProxy.h	2020-01-14 22:35:05 UTC (rev 254536)
@@ -30,6 +30,7 @@
 #include "Connection.h"
 #include "MediaPlayerPrivateRemoteIdentifier.h"
 #include "MessageReceiver.h"
+#include "SandboxExtension.h"
 #include <WebCore/MediaPlayer.h>
 #include <wtf/LoggerHelper.h>
 
@@ -82,7 +83,7 @@
     void clearMediaCacheForOrigins(WebCore::MediaPlayerEnums::MediaEngineIdentifier, const String&&, Vector<WebCore::SecurityOriginData>&&);
     void supportsKeySystem(WebCore::MediaPlayerEnums::MediaEngineIdentifier, const String&&, const String&&, CompletionHandler<void(bool)>&&);
 
-    void load(MediaPlayerPrivateRemoteIdentifier, URL&&, WebCore::ContentType&&, String&&, CompletionHandler<void(RemoteMediaPlayerConfiguration&&)>&&);
+    void load(MediaPlayerPrivateRemoteIdentifier, URL&&, Optional<SandboxExtension::Handle>&&, WebCore::ContentType&&, String&&, CompletionHandler<void(RemoteMediaPlayerConfiguration&&)>&&);
     void prepareForPlayback(MediaPlayerPrivateRemoteIdentifier, bool privateMode, WebCore::MediaPlayerEnums::Preload, bool preservesPitch, bool prepareForRendering);
     void cancelLoad(MediaPlayerPrivateRemoteIdentifier);
     void prepareToPlay(MediaPlayerPrivateRemoteIdentifier);

Modified: branches/safari-610.1.1-branch/Source/WebKit/GPUProcess/media/RemoteMediaPlayerManagerProxy.messages.in (254535 => 254536)


--- branches/safari-610.1.1-branch/Source/WebKit/GPUProcess/media/RemoteMediaPlayerManagerProxy.messages.in	2020-01-14 22:26:05 UTC (rev 254535)
+++ branches/safari-610.1.1-branch/Source/WebKit/GPUProcess/media/RemoteMediaPlayerManagerProxy.messages.in	2020-01-14 22:35:05 UTC (rev 254536)
@@ -37,7 +37,7 @@
 
     PrepareForPlayback(WebKit::MediaPlayerPrivateRemoteIdentifier id, bool privateMode, enum:uint8_t WebCore::MediaPlayerEnums::Preload preload, bool preservesPitch, bool prepareForRendering)
 
-    Load(WebKit::MediaPlayerPrivateRemoteIdentifier id, URL url, WebCore::ContentType contentType, String keySystem) -> (struct WebKit::RemoteMediaPlayerConfiguration playerConfiguration) Async
+    Load(WebKit::MediaPlayerPrivateRemoteIdentifier id, URL url, Optional<WebKit::SandboxExtension::Handle> sandboxExtension, WebCore::ContentType contentType, String keySystem) -> (struct WebKit::RemoteMediaPlayerConfiguration playerConfiguration) Async
     CancelLoad(WebKit::MediaPlayerPrivateRemoteIdentifier id)
 
     PrepareToPlay(WebKit::MediaPlayerPrivateRemoteIdentifier id)

Modified: branches/safari-610.1.1-branch/Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.cpp (254535 => 254536)


--- branches/safari-610.1.1-branch/Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.cpp	2020-01-14 22:26:05 UTC (rev 254535)
+++ branches/safari-610.1.1-branch/Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.cpp	2020-01-14 22:35:05 UTC (rev 254536)
@@ -69,6 +69,10 @@
 {
     m_updateCachedStateMessageTimer.stop();
     m_player->invalidate();
+    if (m_sandboxExtension) {
+        m_sandboxExtension->revoke();
+        m_sandboxExtension = nullptr;
+    }
 }
 
 void RemoteMediaPlayerProxy::getConfiguration(RemoteMediaPlayerConfiguration& configuration)
@@ -82,11 +86,19 @@
     configuration.shouldIgnoreIntrinsicSize = m_player->shouldIgnoreIntrinsicSize();
 }
 
-void RemoteMediaPlayerProxy::load(const URL& url, const ContentType& contentType, const String& keySystem, CompletionHandler<void(RemoteMediaPlayerConfiguration&&)>&& completionHandler)
+void RemoteMediaPlayerProxy::load(const URL& url, Optional<SandboxExtension::Handle>&& sandboxExtensionHandle, const ContentType& contentType, const String& keySystem, CompletionHandler<void(RemoteMediaPlayerConfiguration&&)>&& completionHandler)
 {
+    RemoteMediaPlayerConfiguration configuration;
+
+    if (sandboxExtensionHandle) {
+        m_sandboxExtension = SandboxExtension::create(WTFMove(sandboxExtensionHandle.value()));
+        if (m_sandboxExtension)
+            m_sandboxExtension->consume();
+        else
+            WTFLogAlways("Unable to create sandbox extension for media url.\n");
+    }
+
     m_player->load(url, contentType, keySystem);
-
-    RemoteMediaPlayerConfiguration configuration;
     getConfiguration(configuration);
     completionHandler(WTFMove(configuration));
 }

Modified: branches/safari-610.1.1-branch/Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.h (254535 => 254536)


--- branches/safari-610.1.1-branch/Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.h	2020-01-14 22:26:05 UTC (rev 254535)
+++ branches/safari-610.1.1-branch/Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.h	2020-01-14 22:35:05 UTC (rev 254536)
@@ -33,6 +33,7 @@
 #include "RemoteMediaPlayerProxyConfiguration.h"
 #include "RemoteMediaPlayerState.h"
 #include "RemoteMediaResourceIdentifier.h"
+#include "SandboxExtension.h"
 #include <WebCore/Cookie.h>
 #include <WebCore/MediaPlayer.h>
 #include <WebCore/PlatformMediaResourceLoader.h>
@@ -60,7 +61,7 @@
 
     void prepareForPlayback(bool privateMode, WebCore::MediaPlayerEnums::Preload, bool preservesPitch, bool prepareForRendering);
 
-    void load(const URL&, const WebCore::ContentType&, const String&, CompletionHandler<void(RemoteMediaPlayerConfiguration&&)>&&);
+    void load(const URL&, Optional<SandboxExtension::Handle>&&, const WebCore::ContentType&, const String&, CompletionHandler<void(RemoteMediaPlayerConfiguration&&)>&&);
     void cancelLoad();
 
     void prepareToPlay();
@@ -186,6 +187,7 @@
 #endif
 
     MediaPlayerPrivateRemoteIdentifier m_id;
+    RefPtr<SandboxExtension> m_sandboxExtension;
     Ref<IPC::Connection> m_webProcessConnection;
     RefPtr<WebCore::MediaPlayer> m_player;
     RemoteMediaPlayerManagerProxy& m_manager;

Modified: branches/safari-610.1.1-branch/Source/WebKit/UIProcess/GPU/GPUProcessProxy.cpp (254535 => 254536)


--- branches/safari-610.1.1-branch/Source/WebKit/UIProcess/GPU/GPUProcessProxy.cpp	2020-01-14 22:26:05 UTC (rev 254535)
+++ branches/safari-610.1.1-branch/Source/WebKit/UIProcess/GPU/GPUProcessProxy.cpp	2020-01-14 22:35:05 UTC (rev 254536)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2019 Apple Inc. All rights reserved.
+ * Copyright (C) 2019-2020 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -47,7 +47,7 @@
 #include <wtf/spi/darwin/XPCSPI.h>
 #endif
 
-#define MESSAGE_CHECK(assertion) MESSAGE_CHECK_BASE(assertion, connection())
+#define MESSAGE_CHECK(assertion) MESSAGE_CHECK_BASE(assertion, this->connection())
 
 namespace WebKit {
 using namespace WebCore;
@@ -125,7 +125,9 @@
 
 void GPUProcessProxy::openGPUProcessConnection(ConnectionRequestIdentifier connectionRequestIdentifier, WebProcessProxy& webProcessProxy)
 {
-    connection()->sendWithAsyncReply(Messages::GPUProcess::CreateGPUConnectionToWebProcess { webProcessProxy.coreProcessIdentifier(), webProcessProxy.sessionID() }, [this, weakThis = makeWeakPtr(this), webProcessProxy = makeWeakPtr(webProcessProxy), connectionRequestIdentifier](auto&& connectionIdentifier) mutable {
+    auto& connection = *this->connection();
+
+    connection.sendWithAsyncReply(Messages::GPUProcess::CreateGPUConnectionToWebProcess { webProcessProxy.coreProcessIdentifier(), webProcessProxy.sessionID() }, [this, weakThis = makeWeakPtr(this), webProcessProxy = makeWeakPtr(webProcessProxy), connectionRequestIdentifier](auto&& connectionIdentifier) mutable {
         if (!weakThis)
             return;
 
@@ -142,7 +144,7 @@
         request.reply(GPUProcessConnectionInfo { WTFMove(*connectionIdentifier) });
 #elif OS(DARWIN)
         MESSAGE_CHECK(MACH_PORT_VALID(connectionIdentifier->port()));
-        request.reply(GPUProcessConnectionInfo { IPC::Attachment { connectionIdentifier->port(), MACH_MSG_TYPE_MOVE_SEND } });
+        request.reply(GPUProcessConnectionInfo { IPC::Attachment { connectionIdentifier->port(), MACH_MSG_TYPE_MOVE_SEND }, this->connection()->getAuditToken() });
 #else
         notImplemented();
 #endif

Modified: branches/safari-610.1.1-branch/Source/WebKit/UIProcess/GPU/GPUProcessProxy.h (254535 => 254536)


--- branches/safari-610.1.1-branch/Source/WebKit/UIProcess/GPU/GPUProcessProxy.h	2020-01-14 22:26:05 UTC (rev 254535)
+++ branches/safari-610.1.1-branch/Source/WebKit/UIProcess/GPU/GPUProcessProxy.h	2020-01-14 22:35:05 UTC (rev 254536)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2019 Apple Inc. All rights reserved.
+ * Copyright (C) 2019-2020 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -32,11 +32,9 @@
 #include "ProcessLauncher.h"
 #include "ProcessThrottler.h"
 #include "ProcessThrottlerClient.h"
-#include "TransactionID.h"
 #include "WebPageProxyIdentifier.h"
 #include "WebProcessProxyMessagesReplies.h"
 #include <memory>
-#include <wtf/Deque.h>
 
 namespace WebKit {
 
@@ -96,7 +94,6 @@
 
     ProcessThrottler m_throttler;
     ProcessThrottler::ActivityVariant m_activityFromWebProcesses;
-
 #if ENABLE(MEDIA_STREAM)
     bool m_useMockCaptureDevices { false };
 #endif

Modified: branches/safari-610.1.1-branch/Source/WebKit/UIProcess/WebProcessProxy.cpp (254535 => 254536)


--- branches/safari-610.1.1-branch/Source/WebKit/UIProcess/WebProcessProxy.cpp	2020-01-14 22:26:05 UTC (rev 254535)
+++ branches/safari-610.1.1-branch/Source/WebKit/UIProcess/WebProcessProxy.cpp	2020-01-14 22:35:05 UTC (rev 254536)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010-2019 Apple Inc. All rights reserved.
+ * Copyright (C) 2010-2020 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions

Modified: branches/safari-610.1.1-branch/Source/WebKit/UIProcess/WebProcessProxy.h (254535 => 254536)


--- branches/safari-610.1.1-branch/Source/WebKit/UIProcess/WebProcessProxy.h	2020-01-14 22:26:05 UTC (rev 254535)
+++ branches/safari-610.1.1-branch/Source/WebKit/UIProcess/WebProcessProxy.h	2020-01-14 22:35:05 UTC (rev 254536)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010-2019 Apple Inc. All rights reserved.
+ * Copyright (C) 2010-2020 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions

Modified: branches/safari-610.1.1-branch/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp (254535 => 254536)


--- branches/safari-610.1.1-branch/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp	2020-01-14 22:26:05 UTC (rev 254535)
+++ branches/safari-610.1.1-branch/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp	2020-01-14 22:35:05 UTC (rev 254536)
@@ -31,6 +31,7 @@
 #include "APIWebsiteDataRecord.h"
 #include "AuthenticatorManager.h"
 #include "DeviceIdHashSaltStorage.h"
+#include "GPUProcessProxy.h"
 #include "MockAuthenticatorManager.h"
 #include "NetworkProcessMessages.h"
 #include "ShouldGrandfatherStatistics.h"

Modified: branches/safari-610.1.1-branch/Source/WebKit/WebProcess/GPU/GPUProcessConnection.h (254535 => 254536)


--- branches/safari-610.1.1-branch/Source/WebKit/WebProcess/GPU/GPUProcessConnection.h	2020-01-14 22:26:05 UTC (rev 254535)
+++ branches/safari-610.1.1-branch/Source/WebKit/WebProcess/GPU/GPUProcessConnection.h	2020-01-14 22:35:05 UTC (rev 254536)
@@ -47,6 +47,11 @@
     
     IPC::Connection& connection() { return m_connection.get(); }
 
+#if HAVE(AUDIT_TOKEN)
+    void setAuditToken(Optional<audit_token_t> auditToken) { m_auditToken = auditToken; }
+    Optional<audit_token_t> auditToken() const { return m_auditToken; }
+#endif
+
 private:
     GPUProcessConnection(IPC::Connection::Identifier);
 
@@ -57,6 +62,10 @@
 
     // The connection from the web process to the GPU process.
     Ref<IPC::Connection> m_connection;
+
+#if HAVE(AUDIT_TOKEN)
+    Optional<audit_token_t> m_auditToken;
+#endif
 };
 
 } // namespace WebKit

Modified: branches/safari-610.1.1-branch/Source/WebKit/WebProcess/GPU/GPUProcessConnectionInfo.h (254535 => 254536)


--- branches/safari-610.1.1-branch/Source/WebKit/WebProcess/GPU/GPUProcessConnectionInfo.h	2020-01-14 22:26:05 UTC (rev 254535)
+++ branches/safari-610.1.1-branch/Source/WebKit/WebProcess/GPU/GPUProcessConnectionInfo.h	2020-01-14 22:35:05 UTC (rev 254536)
@@ -31,6 +31,9 @@
 
 struct GPUProcessConnectionInfo {
     IPC::Attachment connection;
+#if HAVE(AUDIT_TOKEN)
+    Optional<audit_token_t> auditToken;
+#endif
 
     IPC::Connection::Identifier identifier()
     {
@@ -60,6 +63,9 @@
     void encode(IPC::Encoder& encoder) const
     {
         encoder << connection;
+#if HAVE(AUDIT_TOKEN)
+        encoder << auditToken;
+#endif
     }
     
     static bool decode(IPC::Decoder& decoder, GPUProcessConnectionInfo& info)
@@ -66,6 +72,10 @@
     {
         if (!decoder.decode(info.connection))
             return false;
+#if HAVE(AUDIT_TOKEN)
+        if (!decoder.decode(info.auditToken))
+            return false;
+#endif
         return true;
     }
 };

Modified: branches/safari-610.1.1-branch/Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp (254535 => 254536)


--- branches/safari-610.1.1-branch/Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp	2020-01-14 22:26:05 UTC (rev 254535)
+++ branches/safari-610.1.1-branch/Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp	2020-01-14 22:35:05 UTC (rev 254536)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2019 Apple Inc. All rights reserved.
+ * Copyright (C) 2019-2020 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -30,7 +30,9 @@
 
 #include "Logging.h"
 #include "RemoteMediaPlayerManagerProxyMessages.h"
+#include "SandboxExtension.h"
 #include "WebCoreArgumentCoders.h"
+#include "WebProcess.h"
 #include <WebCore/MediaPlayer.h>
 #include <WebCore/NotImplemented.h>
 #include <WebCore/PlatformLayer.h>
@@ -84,12 +86,38 @@
 
 void MediaPlayerPrivateRemote::prepareForPlayback(bool privateMode, MediaPlayer::Preload preload, bool preservesPitch, bool prepare)
 {
-    m_manager.gpuProcessConnection().send(Messages::RemoteMediaPlayerManagerProxy::PrepareForPlayback(m_id, privateMode, preload, preservesPitch, prepare), 0);
+    m_manager.gpuProcessConnection().connection().send(Messages::RemoteMediaPlayerManagerProxy::PrepareForPlayback(m_id, privateMode, preload, preservesPitch, prepare), 0);
 }
 
 void MediaPlayerPrivateRemote::MediaPlayerPrivateRemote::load(const URL& url, const ContentType& contentType, const String& keySystem)
 {
-    m_manager.gpuProcessConnection().sendWithAsyncReply(Messages::RemoteMediaPlayerManagerProxy::Load(m_id, url, contentType, keySystem), [weakThis = makeWeakPtr(*this)](auto&& configuration) {
+    auto& connection = m_manager.gpuProcessConnection().connection();
+    Optional<SandboxExtension::Handle> sandboxExtensionHandle;
+    if (url.isLocalFile()) {
+        SandboxExtension::Handle handle;
+        auto fileSystemPath = url.fileSystemPath();
+        bool createdExtension = false;
+
+#if HAVE(SANDBOX_ISSUE_READ_EXTENSION_TO_PROCESS_BY_AUDIT_TOKEN)
+        auto auditToken = m_manager.gpuProcessConnection().auditToken();
+        ASSERT(auditToken);
+        if (auditToken)
+            createdExtension = SandboxExtension::createHandleForReadByAuditToken(fileSystemPath, auditToken.value(), handle);
+        else
+#endif
+        createdExtension = SandboxExtension::createHandle(fileSystemPath, SandboxExtension::Type::ReadOnly, handle);
+
+        if (!createdExtension) {
+            WTFLogAlways("Unable to create sandbox extension handle for GPUProcess url.\n");
+            m_cachedState.networkState = MediaPlayer::NetworkState::FormatError;
+            m_player->networkStateChanged();
+            return;
+        }
+
+        sandboxExtensionHandle = WTFMove(handle);
+    }
+
+    connection.sendWithAsyncReply(Messages::RemoteMediaPlayerManagerProxy::Load(m_id, url, sandboxExtensionHandle, contentType, keySystem), [weakThis = makeWeakPtr(*this)](auto&& configuration) {
         if (weakThis)
             weakThis->m_configuration = configuration;
     });
@@ -97,49 +125,49 @@
 
 void MediaPlayerPrivateRemote::cancelLoad()
 {
-    m_manager.gpuProcessConnection().send(Messages::RemoteMediaPlayerManagerProxy::CancelLoad(m_id), 0);
+    m_manager.gpuProcessConnection().connection().send(Messages::RemoteMediaPlayerManagerProxy::CancelLoad(m_id), 0);
 }
 
 void MediaPlayerPrivateRemote::prepareToPlay()
 {
-    m_manager.gpuProcessConnection().send(Messages::RemoteMediaPlayerManagerProxy::PrepareToPlay(m_id), 0);
+    m_manager.gpuProcessConnection().connection().send(Messages::RemoteMediaPlayerManagerProxy::PrepareToPlay(m_id), 0);
 }
 
 void MediaPlayerPrivateRemote::play()
 {
     m_cachedState.paused = false;
-    m_manager.gpuProcessConnection().send(Messages::RemoteMediaPlayerManagerProxy::Play(m_id), 0);
+    m_manager.gpuProcessConnection().connection().send(Messages::RemoteMediaPlayerManagerProxy::Play(m_id), 0);
 }
 
 void MediaPlayerPrivateRemote::pause()
 {
     m_cachedState.paused = true;
-    m_manager.gpuProcessConnection().send(Messages::RemoteMediaPlayerManagerProxy::Pause(m_id), 0);
+    m_manager.gpuProcessConnection().connection().send(Messages::RemoteMediaPlayerManagerProxy::Pause(m_id), 0);
 }
 
 void MediaPlayerPrivateRemote::setPreservesPitch(bool preservesPitch)
 {
-    m_manager.gpuProcessConnection().send(Messages::RemoteMediaPlayerManagerProxy::SetPreservesPitch(m_id, preservesPitch), 0);
+    m_manager.gpuProcessConnection().connection().send(Messages::RemoteMediaPlayerManagerProxy::SetPreservesPitch(m_id, preservesPitch), 0);
 }
 
 void MediaPlayerPrivateRemote::setVolumeDouble(double volume)
 {
-    m_manager.gpuProcessConnection().send(Messages::RemoteMediaPlayerManagerProxy::SetVolume(m_id, volume), 0);
+    m_manager.gpuProcessConnection().connection().send(Messages::RemoteMediaPlayerManagerProxy::SetVolume(m_id, volume), 0);
 }
 
 void MediaPlayerPrivateRemote::setMuted(bool muted)
 {
-    m_manager.gpuProcessConnection().send(Messages::RemoteMediaPlayerManagerProxy::SetMuted(m_id, muted), 0);
+    m_manager.gpuProcessConnection().connection().send(Messages::RemoteMediaPlayerManagerProxy::SetMuted(m_id, muted), 0);
 }
 
 void MediaPlayerPrivateRemote::setPreload(MediaPlayer::Preload preload)
 {
-    m_manager.gpuProcessConnection().send(Messages::RemoteMediaPlayerManagerProxy::SetPreload(m_id, preload), 0);
+    m_manager.gpuProcessConnection().connection().send(Messages::RemoteMediaPlayerManagerProxy::SetPreload(m_id, preload), 0);
 }
 
 void MediaPlayerPrivateRemote::setPrivateBrowsingMode(bool privateMode)
 {
-    m_manager.gpuProcessConnection().send(Messages::RemoteMediaPlayerManagerProxy::SetPrivateBrowsingMode(m_id, privateMode), 0);
+    m_manager.gpuProcessConnection().connection().send(Messages::RemoteMediaPlayerManagerProxy::SetPrivateBrowsingMode(m_id, privateMode), 0);
 }
 
 MediaTime MediaPlayerPrivateRemote::currentMediaTime() const
@@ -150,13 +178,13 @@
 void MediaPlayerPrivateRemote::seek(const MediaTime& time)
 {
     m_seeking = true;
-    m_manager.gpuProcessConnection().send(Messages::RemoteMediaPlayerManagerProxy::Seek(m_id, time), 0);
+    m_manager.gpuProcessConnection().connection().send(Messages::RemoteMediaPlayerManagerProxy::Seek(m_id, time), 0);
 }
 
 void MediaPlayerPrivateRemote::seekWithTolerance(const MediaTime& time, const MediaTime& negativeTolerance, const MediaTime& positiveTolerance)
 {
     m_seeking = true;
-    m_manager.gpuProcessConnection().send(Messages::RemoteMediaPlayerManagerProxy::SeekWithTolerance(m_id, time, negativeTolerance, positiveTolerance), 0);
+    m_manager.gpuProcessConnection().connection().send(Messages::RemoteMediaPlayerManagerProxy::SeekWithTolerance(m_id, time, negativeTolerance, positiveTolerance), 0);
 }
 
 bool MediaPlayerPrivateRemote::didLoadingProgress() const
@@ -313,42 +341,42 @@
 
 void MediaPlayerPrivateRemote::prepareForRendering()
 {
-    m_manager.gpuProcessConnection().send(Messages::RemoteMediaPlayerManagerProxy::PrepareForRendering(m_id), 0);
+    m_manager.gpuProcessConnection().connection().send(Messages::RemoteMediaPlayerManagerProxy::PrepareForRendering(m_id), 0);
 }
 
 void MediaPlayerPrivateRemote::setSize(const WebCore::IntSize& size)
 {
-    m_manager.gpuProcessConnection().send(Messages::RemoteMediaPlayerManagerProxy::SetSize(m_id, size), 0);
+    m_manager.gpuProcessConnection().connection().send(Messages::RemoteMediaPlayerManagerProxy::SetSize(m_id, size), 0);
 }
 
 void MediaPlayerPrivateRemote::setVisible(bool visible)
 {
-    m_manager.gpuProcessConnection().send(Messages::RemoteMediaPlayerManagerProxy::SetVisible(m_id, visible), 0);
+    m_manager.gpuProcessConnection().connection().send(Messages::RemoteMediaPlayerManagerProxy::SetVisible(m_id, visible), 0);
 }
 
 void MediaPlayerPrivateRemote::setShouldMaintainAspectRatio(bool maintainRatio)
 {
-    m_manager.gpuProcessConnection().send(Messages::RemoteMediaPlayerManagerProxy::SetShouldMaintainAspectRatio(m_id, maintainRatio), 0);
+    m_manager.gpuProcessConnection().connection().send(Messages::RemoteMediaPlayerManagerProxy::SetShouldMaintainAspectRatio(m_id, maintainRatio), 0);
 }
 
 void MediaPlayerPrivateRemote::setVideoFullscreenFrame(WebCore::FloatRect rect)
 {
-    m_manager.gpuProcessConnection().send(Messages::RemoteMediaPlayerManagerProxy::SetVideoFullscreenFrame(m_id, rect), 0);
+    m_manager.gpuProcessConnection().connection().send(Messages::RemoteMediaPlayerManagerProxy::SetVideoFullscreenFrame(m_id, rect), 0);
 }
 
 void MediaPlayerPrivateRemote::setVideoFullscreenGravity(WebCore::MediaPlayerEnums::VideoGravity gravity)
 {
-    m_manager.gpuProcessConnection().send(Messages::RemoteMediaPlayerManagerProxy::SetVideoFullscreenGravity(m_id, gravity), 0);
+    m_manager.gpuProcessConnection().connection().send(Messages::RemoteMediaPlayerManagerProxy::SetVideoFullscreenGravity(m_id, gravity), 0);
 }
 
 void MediaPlayerPrivateRemote::acceleratedRenderingStateChanged()
 {
-    m_manager.gpuProcessConnection().send(Messages::RemoteMediaPlayerManagerProxy::AcceleratedRenderingStateChanged(m_id, m_player->supportsAcceleratedRendering()), 0);
+    m_manager.gpuProcessConnection().connection().send(Messages::RemoteMediaPlayerManagerProxy::AcceleratedRenderingStateChanged(m_id, m_player->supportsAcceleratedRendering()), 0);
 }
 
 void MediaPlayerPrivateRemote::setShouldDisableSleep(bool disable)
 {
-    m_manager.gpuProcessConnection().send(Messages::RemoteMediaPlayerManagerProxy::SetShouldDisableSleep(m_id, disable), 0);
+    m_manager.gpuProcessConnection().connection().send(Messages::RemoteMediaPlayerManagerProxy::SetShouldDisableSleep(m_id, disable), 0);
 }
 
 FloatSize MediaPlayerPrivateRemote::naturalSize() const
@@ -813,7 +841,7 @@
     ASSERT(!m_mediaResources.contains(remoteMediaResourceIdentifier));
     auto resource = m_mediaResourceLoader->requestResource(WTFMove(request), options);
     // PlatformMediaResource owns the PlatformMediaResourceClient
-    resource->setClient(makeUnique<RemoteMediaResourceProxy>(m_manager.gpuProcessConnection(), *resource, remoteMediaResourceIdentifier));
+    resource->setClient(makeUnique<RemoteMediaResourceProxy>(m_manager.gpuProcessConnection().connection(), *resource, remoteMediaResourceIdentifier));
     m_mediaResources.add(remoteMediaResourceIdentifier, WTFMove(resource));
 }
 

Modified: branches/safari-610.1.1-branch/Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.h (254535 => 254536)


--- branches/safari-610.1.1-branch/Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.h	2020-01-14 22:26:05 UTC (rev 254535)
+++ branches/safari-610.1.1-branch/Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.h	2020-01-14 22:35:05 UTC (rev 254536)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2019 Apple Inc. All rights reserved.
+ * Copyright (C) 2019-2020 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions

Modified: branches/safari-610.1.1-branch/Source/WebKit/WebProcess/GPU/media/RemoteMediaPlayerMIMETypeCache.cpp (254535 => 254536)


--- branches/safari-610.1.1-branch/Source/WebKit/WebProcess/GPU/media/RemoteMediaPlayerMIMETypeCache.cpp	2020-01-14 22:26:05 UTC (rev 254535)
+++ branches/safari-610.1.1-branch/Source/WebKit/WebProcess/GPU/media/RemoteMediaPlayerMIMETypeCache.cpp	2020-01-14 22:35:05 UTC (rev 254536)
@@ -87,7 +87,7 @@
 bool RemoteMediaPlayerMIMETypeCache::canDecodeExtendedType(const WebCore::ContentType& type)
 {
     bool result;
-    if (!m_manager.gpuProcessConnection().sendSync(Messages::RemoteMediaPlayerManagerProxy::CanDecodeExtendedType(m_engineIdentifier, type.raw()), Messages::RemoteMediaPlayerManagerProxy::CanDecodeExtendedType::Reply(result), 0))
+    if (!m_manager.gpuProcessConnection().connection().sendSync(Messages::RemoteMediaPlayerManagerProxy::CanDecodeExtendedType(m_engineIdentifier, type.raw()), Messages::RemoteMediaPlayerManagerProxy::CanDecodeExtendedType::Reply(result), 0))
         return false;
 
     return result;
@@ -108,7 +108,7 @@
     }
 
     MediaPlayer::SupportsType result;
-    if (!m_manager.gpuProcessConnection().sendSync(Messages::RemoteMediaPlayerManagerProxy::SupportsTypeAndCodecs(m_engineIdentifier, parameters), Messages::RemoteMediaPlayerManagerProxy::SupportsTypeAndCodecs::Reply(result), 0))
+    if (!m_manager.gpuProcessConnection().connection().sendSync(Messages::RemoteMediaPlayerManagerProxy::SupportsTypeAndCodecs(m_engineIdentifier, parameters), Messages::RemoteMediaPlayerManagerProxy::SupportsTypeAndCodecs::Reply(result), 0))
         return MediaPlayer::SupportsType::IsNotSupported;
 
     if (!m_supportsTypeAndCodecsCache)
@@ -125,7 +125,7 @@
         return;
 
     Vector<String> types;
-    if (!m_manager.gpuProcessConnection().sendSync(Messages::RemoteMediaPlayerManagerProxy::GetSupportedTypes(m_engineIdentifier), Messages::RemoteMediaPlayerManagerProxy::GetSupportedTypes::Reply(types), 0))
+    if (!m_manager.gpuProcessConnection().connection().sendSync(Messages::RemoteMediaPlayerManagerProxy::GetSupportedTypes(m_engineIdentifier), Messages::RemoteMediaPlayerManagerProxy::GetSupportedTypes::Reply(types), 0))
         return;
 
     for (auto& type : types)

Modified: branches/safari-610.1.1-branch/Source/WebKit/WebProcess/GPU/media/RemoteMediaPlayerManager.cpp (254535 => 254536)


--- branches/safari-610.1.1-branch/Source/WebKit/WebProcess/GPU/media/RemoteMediaPlayerManager.cpp	2020-01-14 22:26:05 UTC (rev 254535)
+++ branches/safari-610.1.1-branch/Source/WebKit/WebProcess/GPU/media/RemoteMediaPlayerManager.cpp	2020-01-14 22:35:05 UTC (rev 254536)
@@ -28,7 +28,6 @@
 
 #if ENABLE(GPU_PROCESS)
 
-#include "GPUProcessConnection.h"
 #include "MediaPlayerPrivateRemote.h"
 #include "RemoteMediaPlayerConfiguration.h"
 #include "RemoteMediaPlayerMIMETypeCache.h"
@@ -164,7 +163,7 @@
     proxyConfiguration.isVideo = player->isVideoPlayer();
 
     RemoteMediaPlayerConfiguration playerConfiguration;
-    bool sendSucceeded = gpuProcessConnection().sendSync(Messages::RemoteMediaPlayerManagerProxy::CreateMediaPlayer(id, remoteEngineIdentifier, proxyConfiguration), Messages::RemoteMediaPlayerManagerProxy::CreateMediaPlayer::Reply(playerConfiguration), 0);
+    bool sendSucceeded = gpuProcessConnection().connection().sendSync(Messages::RemoteMediaPlayerManagerProxy::CreateMediaPlayer(id, remoteEngineIdentifier, proxyConfiguration), Messages::RemoteMediaPlayerManagerProxy::CreateMediaPlayer::Reply(playerConfiguration), 0);
     if (!sendSucceeded) {
         WTFLogAlways("Failed to create remote media player.");
         return nullptr;
@@ -178,7 +177,7 @@
 void RemoteMediaPlayerManager::deleteRemoteMediaPlayer(MediaPlayerPrivateRemoteIdentifier id)
 {
     m_players.take(id);
-    gpuProcessConnection().send(Messages::RemoteMediaPlayerManagerProxy::DeleteMediaPlayer(id), 0);
+    gpuProcessConnection().connection().send(Messages::RemoteMediaPlayerManagerProxy::DeleteMediaPlayer(id), 0);
 }
 
 void RemoteMediaPlayerManager::getSupportedTypes(MediaPlayerEnums::MediaEngineIdentifier remoteEngineIdentifier, HashSet<String, ASCIICaseInsensitiveHash>& result)
@@ -192,7 +191,7 @@
     }
 
     Vector<String> types;
-    if (!gpuProcessConnection().sendSync(Messages::RemoteMediaPlayerManagerProxy::GetSupportedTypes(remoteEngineIdentifier), Messages::RemoteMediaPlayerManagerProxy::GetSupportedTypes::Reply(types), 0))
+    if (!gpuProcessConnection().connection().sendSync(Messages::RemoteMediaPlayerManagerProxy::GetSupportedTypes(remoteEngineIdentifier), Messages::RemoteMediaPlayerManagerProxy::GetSupportedTypes::Reply(types), 0))
         return;
 
     result = HashSet<String, ASCIICaseInsensitiveHash>();
@@ -214,7 +213,7 @@
 HashSet<RefPtr<SecurityOrigin>> RemoteMediaPlayerManager::originsInMediaCache(MediaPlayerEnums::MediaEngineIdentifier remoteEngineIdentifier, const String& path)
 {
     Vector<SecurityOriginData> originData;
-    if (!gpuProcessConnection().sendSync(Messages::RemoteMediaPlayerManagerProxy::OriginsInMediaCache(remoteEngineIdentifier, path), Messages::RemoteMediaPlayerManagerProxy::OriginsInMediaCache::Reply(originData), 0))
+    if (!gpuProcessConnection().connection().sendSync(Messages::RemoteMediaPlayerManagerProxy::OriginsInMediaCache(remoteEngineIdentifier, path), Messages::RemoteMediaPlayerManagerProxy::OriginsInMediaCache::Reply(originData), 0))
         return { };
 
     HashSet<RefPtr<SecurityOrigin>> origins;
@@ -226,7 +225,7 @@
 
 void RemoteMediaPlayerManager::clearMediaCache(MediaPlayerEnums::MediaEngineIdentifier remoteEngineIdentifier, const String& path, WallTime modifiedSince)
 {
-    gpuProcessConnection().send(Messages::RemoteMediaPlayerManagerProxy::ClearMediaCache(remoteEngineIdentifier, path, modifiedSince), 0);
+    gpuProcessConnection().connection().send(Messages::RemoteMediaPlayerManagerProxy::ClearMediaCache(remoteEngineIdentifier, path, modifiedSince), 0);
 }
 
 void RemoteMediaPlayerManager::clearMediaCacheForOrigins(MediaPlayerEnums::MediaEngineIdentifier remoteEngineIdentifier, const String& path, const HashSet<RefPtr<SecurityOrigin>>& origins)
@@ -235,7 +234,7 @@
         return origin->data();
     });
 
-    gpuProcessConnection().send(Messages::RemoteMediaPlayerManagerProxy::ClearMediaCacheForOrigins(remoteEngineIdentifier, path, originData), 0);
+    gpuProcessConnection().connection().send(Messages::RemoteMediaPlayerManagerProxy::ClearMediaCacheForOrigins(remoteEngineIdentifier, path, originData), 0);
 }
 
 void RemoteMediaPlayerManager::networkStateChanged(MediaPlayerPrivateRemoteIdentifier id, RemoteMediaPlayerState&& state)
@@ -333,9 +332,12 @@
         player->updateCachedState(WTFMove(state));
 }
 
-IPC::Connection& RemoteMediaPlayerManager::gpuProcessConnection() const
+GPUProcessConnection& RemoteMediaPlayerManager::gpuProcessConnection() const
 {
-    return WebProcess::singleton().ensureGPUProcessConnection().connection();
+    if (!m_gpuProcessConnection)
+        m_gpuProcessConnection = &WebProcess::singleton().ensureGPUProcessConnection();
+
+    return *m_gpuProcessConnection;
 }
 
 } // namespace WebKit

Modified: branches/safari-610.1.1-branch/Source/WebKit/WebProcess/GPU/media/RemoteMediaPlayerManager.h (254535 => 254536)


--- branches/safari-610.1.1-branch/Source/WebKit/WebProcess/GPU/media/RemoteMediaPlayerManager.h	2020-01-14 22:26:05 UTC (rev 254535)
+++ branches/safari-610.1.1-branch/Source/WebKit/WebProcess/GPU/media/RemoteMediaPlayerManager.h	2020-01-14 22:35:05 UTC (rev 254536)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2019 Apple Inc. All rights reserved.
+ * Copyright (C) 2019-2020 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -27,6 +27,7 @@
 
 #if ENABLE(GPU_PROCESS)
 
+#include "GPUProcessConnection.h"
 #include "MediaPlayerPrivateRemoteIdentifier.h"
 #include "MessageReceiver.h"
 #include "RemoteMediaPlayerState.h"
@@ -54,10 +55,11 @@
     ~RemoteMediaPlayerManager();
 
     static const char* supplementName();
+    WebProcess& parentProcess() const { return m_process; }
 
     void updatePreferences(const WebCore::Settings&);
 
-    IPC::Connection& gpuProcessConnection() const;
+    GPUProcessConnection& gpuProcessConnection() const;
 
     void didReceiveMessageFromGPUProcess(IPC::Connection& connection, IPC::Decoder& decoder) { didReceiveMessage(connection, decoder); }
 
@@ -101,6 +103,7 @@
 
     HashMap<MediaPlayerPrivateRemoteIdentifier, WeakPtr<MediaPlayerPrivateRemote>> m_players;
     WebProcess& m_process;
+    mutable GPUProcessConnection* m_gpuProcessConnection { nullptr };
 };
 
 } // namespace WebKit

Modified: branches/safari-610.1.1-branch/Source/WebKit/WebProcess/WebProcess.cpp (254535 => 254536)


--- branches/safari-610.1.1-branch/Source/WebKit/WebProcess/WebProcess.cpp	2020-01-14 22:26:05 UTC (rev 254535)
+++ branches/safari-610.1.1-branch/Source/WebKit/WebProcess/WebProcess.cpp	2020-01-14 22:35:05 UTC (rev 254536)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2009-2019 Apple Inc. All rights reserved.
+ * Copyright (C) 2009-2020 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -1299,6 +1299,10 @@
             CRASH();
 
         m_gpuProcessConnection = GPUProcessConnection::create(connectionInfo.releaseIdentifier());
+#if HAVE(AUDIT_TOKEN)
+        ASSERT(connectionInfo.auditToken);
+        m_gpuProcessConnection->setAuditToken(WTFMove(connectionInfo.auditToken));
+#endif
     }
     
     return *m_gpuProcessConnection;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to