Changeset 220780 in webkit
- Timestamp:
- Aug 15, 2017, 6:37:30 PM (9 years ago)
- Location:
- trunk/Source
- Files:
-
- 8 edited
-
WebCore/ChangeLog (modified) (1 diff)
-
WebCore/platform/LogInitialization.h (modified) (2 diffs)
-
WebCore/platform/Logging.cpp (modified) (1 diff)
-
WebKit/ChangeLog (modified) (1 diff)
-
WebKit/Shared/WebProcessCreationParameters.cpp (modified) (2 diffs)
-
WebKit/Shared/WebProcessCreationParameters.h (modified) (1 diff)
-
WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm (modified) (1 diff)
-
WebKit/WebProcess/cocoa/WebProcessCocoa.mm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r220779 r220780 1 2017-08-15 Simon Fraser <simon.fraser@apple.com> 2 3 Allow WebCore logging channels to be set from the UI process 4 https://bugs.webkit.org/show_bug.cgi?id=175608 5 6 Reviewed by Tim Horton. 7 8 Change initializeLogChannelsIfNecessary() to take an optional String, which can 9 be a list of log channels passed from the UI process. 10 11 * platform/LogInitialization.h: 12 * platform/Logging.cpp: 13 (WebCore::initializeLogChannelsIfNecessary): 14 1 15 2017-08-15 Chris Dumez <cdumez@apple.com> 2 16 -
trunk/Source/WebCore/platform/LogInitialization.h
r205275 r220780 28 28 #include <wtf/Assertions.h> 29 29 #include <wtf/Forward.h> 30 #include <wtf/Optional.h> 31 #include <wtf/text/WTFString.h> 30 32 31 33 namespace WebCore { … … 36 38 bool isLogChannelEnabled(const String& name); 37 39 WEBCORE_EXPORT void setLogChannelToAccumulate(const String& name); 38 WEBCORE_EXPORT void initializeLogChannelsIfNecessary( );40 WEBCORE_EXPORT void initializeLogChannelsIfNecessary(std::optional<String> = std::nullopt); 39 41 40 42 #endif // !LOG_DISABLED || !RELEASE_LOG_DISABLED -
trunk/Source/WebCore/platform/Logging.cpp
r218615 r220780 70 70 } 71 71 72 void initializeLogChannelsIfNecessary( )72 void initializeLogChannelsIfNecessary(std::optional<String> logChannelString) 73 73 { 74 if (!logChannelsNeedInitialization )74 if (!logChannelsNeedInitialization && !logChannelString) 75 75 return; 76 76 77 77 logChannelsNeedInitialization = false; 78 78 79 WTFInitializeLogChannelStatesFromString(logChannels, logChannelCount, logLevelString().utf8().data()); 79 String enabledChannelsString = logChannelString ? logChannelString.value() : logLevelString(); 80 WTFInitializeLogChannelStatesFromString(logChannels, logChannelCount, enabledChannelsString.utf8().data()); 80 81 } 81 82 -
trunk/Source/WebKit/ChangeLog
r220759 r220780 1 2017-08-15 Simon Fraser <simon.fraser@apple.com> 2 3 Allow WebCore logging channels to be set from the UI process 4 https://bugs.webkit.org/show_bug.cgi?id=175608 5 6 Reviewed by Tim Horton. 7 8 The UI process can now read the "WebCoreLogging" default, and pass it to the web process 9 via WebProcessCreationParameters, where WebProcess::platformInitializeWebProcess() uses 10 it to set up WebCore logging channels. Note that these will override channels read from 11 the web process user defaults domain (but those are hard to set anyway). 12 13 * Shared/WebProcessCreationParameters.cpp: 14 (WebKit::WebProcessCreationParameters::encode const): 15 (WebKit::WebProcessCreationParameters::decode): 16 * Shared/WebProcessCreationParameters.h: 17 * UIProcess/Cocoa/WebProcessPoolCocoa.mm: 18 (WebKit::WebProcessPool::platformInitializeWebProcess): 19 * WebProcess/cocoa/WebProcessCocoa.mm: 20 (WebKit::WebProcess::platformInitializeWebProcess): 21 1 22 2017-08-15 Don Olmstead <don.olmstead@sony.com> 2 23 -
trunk/Source/WebKit/Shared/WebProcessCreationParameters.cpp
r219713 r220780 67 67 #endif 68 68 encoder << mediaKeyStorageDirectory; 69 encoder << webCoreLoggingChannels; 69 70 encoder << mediaKeyStorageDirectoryExtensionHandle; 70 71 #if ENABLE(MEDIA_STREAM) … … 188 189 if (!decoder.decode(parameters.mediaKeyStorageDirectory)) 189 190 return false; 191 if (!decoder.decode(parameters.webCoreLoggingChannels)) 192 return false; 190 193 if (!decoder.decode(parameters.mediaKeyStorageDirectoryExtensionHandle)) 191 194 return false; -
trunk/Source/WebKit/Shared/WebProcessCreationParameters.h
r219713 r220780 94 94 String mediaKeyStorageDirectory; 95 95 96 String webCoreLoggingChannels; 97 96 98 Vector<String> urlSchemesRegisteredAsEmptyDocument; 97 99 Vector<String> urlSchemesRegisteredAsSecure; -
trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
r220243 r220780 257 257 #endif 258 258 259 #if !LOG_DISABLED || !RELEASE_LOG_DISABLED 260 parameters.webCoreLoggingChannels = [[NSUserDefaults standardUserDefaults] stringForKey:@"WebCoreLogging"]; 261 #endif 262 259 263 // FIXME: Remove this and related parameter when <rdar://problem/29448368> is fixed. 260 264 if (isSafari && !parameters.shouldCaptureAudioInUIProcess && mediaDevicesEnabled) -
trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm
r220506 r220780 53 53 #import <WebCore/FontCascade.h> 54 54 #import <WebCore/LocalizedStrings.h> 55 #import <WebCore/LogInitialization.h> 55 56 #import <WebCore/MemoryRelease.h> 56 57 #import <WebCore/NSAccessibilitySPI.h> … … 113 114 void WebProcess::platformInitializeWebProcess(WebProcessCreationParameters&& parameters) 114 115 { 116 #if !LOG_DISABLED || !RELEASE_LOG_DISABLED 117 WebCore::initializeLogChannelsIfNecessary(parameters.webCoreLoggingChannels); 118 #endif 119 115 120 WebCore::setApplicationBundleIdentifier(parameters.uiProcessBundleIdentifier); 116 121 SessionTracker::setIdentifierBase(parameters.uiProcessBundleIdentifier);
Note:
See TracChangeset
for help on using the changeset viewer.