Skip to content
Permalink
Browse files
Clean up logging #includes
https://bugs.webkit.org/show_bug.cgi?id=229547

Reviewed by Eric Carlson.

It's actually harmful to include the wrong framework's Logging.h file,
because they conflict with each other. You'll end up with errors like
Unknown symbol "WebCore::WebKit2LogLayout".

No new tests because there is no behavior change.

* GPUProcess/GPUConnectionToWebProcess.cpp:
* GPUProcess/media/RemoteMediaPlayerProxy.cpp:
(WebKit::RemoteMediaPlayerProxy::logChannel const):
* Shared/mac/MediaFormatReader/MediaFormatReader.cpp:
(WebKit::logChannel):
* Shared/mac/MediaFormatReader/MediaSampleCursor.cpp:
(WebKit::MediaSampleCursor::logChannel const):
* Shared/mac/MediaFormatReader/MediaTrackReader.cpp:
(WebKit::MediaTrackReader::logChannel const):
* UIProcess/Media/RemoteMediaSessionCoordinatorProxy.cpp:
(WebKit::RemoteMediaSessionCoordinatorProxy::logChannel const):
* UIProcess/MediaKeySystemPermissionRequestManagerProxy.cpp:
(WebKit::logChannel):
* UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
(WebKit::UserMediaPermissionRequestManagerProxy::logChannel const):
* WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp:
(WebKit::MediaPlayerPrivateRemote::logChannel const):
* WebProcess/GPU/media/MediaSourcePrivateRemote.cpp:
(WebKit::MediaSourcePrivateRemote::logChannel const):
* WebProcess/GPU/media/RemoteAudioSourceProvider.cpp:
(WebKit::RemoteAudioSourceProvider::logChannel const):
* WebProcess/GPU/media/SourceBufferPrivateRemote.cpp:
(WebKit::SourceBufferPrivateRemote::logChannel const):
* WebProcess/MediaSession/RemoteMediaSessionCoordinator.cpp:
(WebKit::RemoteMediaSessionCoordinator::logChannel const):


Canonical link: https://commits.webkit.org/240996@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281640 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
litherum committed Aug 26, 2021
1 parent b658404 commit b59a6319d321df27237af85674bd4817397d23ce
Showing 14 changed files with 62 additions and 17 deletions.
@@ -1,3 +1,42 @@
2021-08-26 Myles C. Maxfield <mmaxfield@apple.com>

Clean up logging #includes
https://bugs.webkit.org/show_bug.cgi?id=229547

Reviewed by Eric Carlson.

It's actually harmful to include the wrong framework's Logging.h file,
because they conflict with each other. You'll end up with errors like
Unknown symbol "WebCore::WebKit2LogLayout".

No new tests because there is no behavior change.

* GPUProcess/GPUConnectionToWebProcess.cpp:
* GPUProcess/media/RemoteMediaPlayerProxy.cpp:
(WebKit::RemoteMediaPlayerProxy::logChannel const):
* Shared/mac/MediaFormatReader/MediaFormatReader.cpp:
(WebKit::logChannel):
* Shared/mac/MediaFormatReader/MediaSampleCursor.cpp:
(WebKit::MediaSampleCursor::logChannel const):
* Shared/mac/MediaFormatReader/MediaTrackReader.cpp:
(WebKit::MediaTrackReader::logChannel const):
* UIProcess/Media/RemoteMediaSessionCoordinatorProxy.cpp:
(WebKit::RemoteMediaSessionCoordinatorProxy::logChannel const):
* UIProcess/MediaKeySystemPermissionRequestManagerProxy.cpp:
(WebKit::logChannel):
* UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
(WebKit::UserMediaPermissionRequestManagerProxy::logChannel const):
* WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp:
(WebKit::MediaPlayerPrivateRemote::logChannel const):
* WebProcess/GPU/media/MediaSourcePrivateRemote.cpp:
(WebKit::MediaSourcePrivateRemote::logChannel const):
* WebProcess/GPU/media/RemoteAudioSourceProvider.cpp:
(WebKit::RemoteAudioSourceProvider::logChannel const):
* WebProcess/GPU/media/SourceBufferPrivateRemote.cpp:
(WebKit::SourceBufferPrivateRemote::logChannel const):
* WebProcess/MediaSession/RemoteMediaSessionCoordinator.cpp:
(WebKit::RemoteMediaSessionCoordinator::logChannel const):

2021-08-26 Kimmo Kinnunen <kkinnunen@apple.com>

RemoteGraphicsContextGL refers to GraphicsContextGLOpenGL::SimulatedEventForTesting
@@ -65,7 +65,6 @@
#include "WebErrors.h"
#include "WebProcessMessages.h"
#include <WebCore/LogInitialization.h>
#include <WebCore/Logging.h>
#include <WebCore/MockRealtimeMediaSourceCenter.h>
#include <WebCore/NowPlayingManager.h>
#include <wtf/Language.h>
@@ -31,6 +31,7 @@
#include "DataReference.h"
#include "GPUConnectionToWebProcess.h"
#include "LayerHostingContext.h"
#include "Logging.h"
#include "MediaPlayerPrivateRemoteMessages.h"
#include "RemoteAudioSourceProviderProxy.h"
#include "RemoteAudioTrackProxy.h"
@@ -48,7 +49,6 @@
#include "TrackPrivateRemoteConfiguration.h"
#include "WebCoreArgumentCoders.h"
#include <WebCore/LayoutRect.h>
#include <WebCore/Logging.h>
#include <WebCore/MediaPlayer.h>
#include <WebCore/MediaPlayerPrivate.h>
#include <WebCore/NotImplemented.h>
@@ -1090,7 +1090,7 @@ void RemoteMediaPlayerProxy::pauseAtHostTime(MonotonicTime time)
#if !RELEASE_LOG_DISABLED
WTFLogChannel& RemoteMediaPlayerProxy::logChannel() const
{
return WebCore::LogMedia;
return JOIN_LOG_CHANNEL_WITH_PREFIX(LOG_CHANNEL_PREFIX, Media);
}
#endif

@@ -28,12 +28,12 @@

#if ENABLE(WEBM_FORMAT_READER)

#include "Logging.h"
#include "MediaTrackReader.h"
#include <WebCore/AudioTrackPrivate.h>
#include <WebCore/ContentType.h>
#include <WebCore/Document.h>
#include <WebCore/InbandTextTrackPrivate.h>
#include <WebCore/Logging.h>
#include <WebCore/MediaSample.h>
#include <WebCore/SourceBufferParserWebM.h>
#include <WebCore/VideoTrackPrivate.h>
@@ -55,7 +55,11 @@ static const void* nextLogIdentifier()
return reinterpret_cast<const void*>(++logIdentifier);
}

static WTFLogChannel& logChannel() { return WebCore::LogMedia; }
static WTFLogChannel& logChannel()
{
return JOIN_LOG_CHANNEL_WITH_PREFIX(LOG_CHANNEL_PREFIX, Media);
}

static const char* logClassName() { return "MediaFormatReader"; }

class AbortAction {
@@ -28,8 +28,8 @@

#if ENABLE(WEBM_FORMAT_READER)

#include "Logging.h"
#include "MediaTrackReader.h"
#include <WebCore/Logging.h>
#include <WebCore/MediaSample.h>
#include <WebCore/SampleMap.h>
#include <pal/avfoundation/MediaTimeAVFoundation.h>
@@ -399,7 +399,7 @@ OSStatus MediaSampleCursor::getPlayableHorizon(CMTime* playableHorizon) const

WTFLogChannel& MediaSampleCursor::logChannel() const
{
return LogMedia;
return JOIN_LOG_CHANNEL_WITH_PREFIX(LOG_CHANNEL_PREFIX, Media);
}

} // namespace WebKit
@@ -28,12 +28,12 @@

#if ENABLE(WEBM_FORMAT_READER)

#include "Logging.h"
#include "MediaFormatReader.h"
#include "MediaSampleByteRange.h"
#include "MediaSampleCursor.h"
#include <WebCore/AudioTrackPrivate.h>
#include <WebCore/InbandTextTrackPrivate.h>
#include <WebCore/Logging.h>
#include <WebCore/MediaDescription.h>
#include <WebCore/SampleMap.h>
#include <WebCore/VideoTrackPrivate.h>
@@ -233,7 +233,7 @@ OSStatus MediaTrackReader::createCursorAtLastSampleInDecodeOrder(MTPluginSampleC

WTFLogChannel& MediaTrackReader::logChannel() const
{
return WebCore::LogMedia;
return JOIN_LOG_CHANNEL_WITH_PREFIX(LOG_CHANNEL_PREFIX, Media);
}

const void* MediaTrackReader::nextSampleCursorLogIdentifier(uint64_t cursorID) const
@@ -28,6 +28,7 @@

#if ENABLE(MEDIA_SESSION_COORDINATOR)

#include "Logging.h"
#include "MediaSessionCoordinatorProxyPrivate.h"
#include "RemoteMediaSessionCoordinatorMessages.h"
#include "RemoteMediaSessionCoordinatorProxyMessages.h"
@@ -182,7 +183,7 @@ void RemoteMediaSessionCoordinatorProxy::coordinatorStateChanged(WebCore::MediaS
#if !RELEASE_LOG_DISABLED
WTFLogChannel& RemoteMediaSessionCoordinatorProxy::logChannel() const
{
return LogMedia;
return JOIN_LOG_CHANNEL_WITH_PREFIX(LOG_CHANNEL_PREFIX, Media);
}
#endif

@@ -51,7 +51,7 @@ static const char* logClassName()

static WTFLogChannel& logChannel()
{
return WebKit2LogEME;
return JOIN_LOG_CHANNEL_WITH_PREFIX(LOG_CHANNEL_PREFIX, EME);
}

const Logger& MediaKeySystemPermissionRequestManagerProxy::logger() const
@@ -912,7 +912,7 @@ void UserMediaPermissionRequestManagerProxy::watchdogTimerFired()
#if !RELEASE_LOG_DISABLED
WTFLogChannel& UserMediaPermissionRequestManagerProxy::logChannel() const
{
return WebKit2LogWebRTC;
return JOIN_LOG_CHANNEL_WITH_PREFIX(LOG_CHANNEL_PREFIX, WebRTC);
}

const Logger& UserMediaPermissionRequestManagerProxy::logger() const
@@ -1396,7 +1396,7 @@ void MediaPlayerPrivateRemote::getRawCookies(const URL& url, WebCore::MediaPlaye
#if !RELEASE_LOG_DISABLED
WTFLogChannel& MediaPlayerPrivateRemote::logChannel() const
{
return LogMedia;
return JOIN_LOG_CHANNEL_WITH_PREFIX(LOG_CHANNEL_PREFIX, Media);
}
#endif

@@ -197,7 +197,7 @@ void MediaSourcePrivateRemote::seekToTime(const MediaTime& time)
#if !RELEASE_LOG_DISABLED
WTFLogChannel& MediaSourcePrivateRemote::logChannel() const
{
return LogMedia;
return JOIN_LOG_CHANNEL_WITH_PREFIX(LOG_CHANNEL_PREFIX, Media);
}
#endif

@@ -29,6 +29,7 @@
#if ENABLE(GPU_PROCESS) && ENABLE(WEB_AUDIO) && PLATFORM(COCOA)

#include "GPUProcessConnection.h"
#include "Logging.h"
#include "RemoteAudioSourceProviderManager.h"
#include "RemoteMediaPlayerProxyMessages.h"

@@ -89,7 +90,7 @@ void RemoteAudioSourceProvider::audioSamplesAvailable(const PlatformAudioData& d
#if !RELEASE_LOG_DISABLED
WTFLogChannel& RemoteAudioSourceProvider::logChannel() const
{
return LogMedia;
return JOIN_LOG_CHANNEL_WITH_PREFIX(LOG_CHANNEL_PREFIX, Media);
}
#endif

@@ -474,7 +474,7 @@ uint64_t SourceBufferPrivateRemote::totalTrackBufferSizeInBytes() const
#if !RELEASE_LOG_DISABLED
WTFLogChannel& SourceBufferPrivateRemote::logChannel() const
{
return LogMedia;
return JOIN_LOG_CHANNEL_WITH_PREFIX(LOG_CHANNEL_PREFIX, Media);
}
#endif

@@ -28,6 +28,7 @@

#if ENABLE(MEDIA_SESSION_COORDINATOR)

#include "Logging.h"
#include "RemoteMediaSessionCoordinatorMessages.h"
#include "RemoteMediaSessionCoordinatorProxyMessages.h"
#include "WebPage.h"
@@ -226,7 +227,7 @@ void RemoteMediaSessionCoordinator::coordinatorStateChanged(WebCore::MediaSessio

WTFLogChannel& RemoteMediaSessionCoordinator::logChannel() const
{
return LogMedia;
return JOIN_LOG_CHANNEL_WITH_PREFIX(LOG_CHANNEL_PREFIX, Media);
}


0 comments on commit b59a631

Please sign in to comment.