WebKit Bugzilla
Attachment 343079 Details for
Bug 186813
: Use getCurrentProcessID over getpid
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-186813.diff (text/plain), 6.71 KB, created by
Don Olmstead
on 2018-06-19 12:33:34 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Don Olmstead
Created:
2018-06-19 12:33:34 PDT
Size:
6.71 KB
patch
obsolete
>diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 4e7ad30cd82..d6b95b3b591 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,15 @@ >+2018-06-19 Don Olmstead <don.olmstead@sony.com> >+ >+ Use getCurrentProcessID over getpid >+ https://bugs.webkit.org/show_bug.cgi?id=186813 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ No new tests (OOPS!). >+ >+ * platform/graphics/x11/XErrorTrapper.cpp: >+ (WebCore::XErrorTrapper::errorEvent): >+ > 2018-06-19 David Kilzer <ddkilzer@apple.com> > > Revert: Add logging when splashboardd enables WebThread >diff --git a/Source/WebCore/platform/graphics/x11/XErrorTrapper.cpp b/Source/WebCore/platform/graphics/x11/XErrorTrapper.cpp >index 6fd4d49dfe3..16376d9f83e 100644 >--- a/Source/WebCore/platform/graphics/x11/XErrorTrapper.cpp >+++ b/Source/WebCore/platform/graphics/x11/XErrorTrapper.cpp >@@ -28,9 +28,9 @@ > > #if PLATFORM(X11) > #include <sys/types.h> >-#include <unistd.h> > #include <wtf/HashMap.h> > #include <wtf/NeverDestroyed.h> >+#include <wtf/ProcessID.h> > > namespace WebCore { > >@@ -90,7 +90,7 @@ void XErrorTrapper::errorEvent(XErrorEvent* event) > " (Details: serial %ld error_code %d request_code %d minor_code %d)\n"; > char errorMessage[64]; > XGetErrorText(m_display, m_errorCode, errorMessage, 63); >- WTFLogAlways(errorFormatString, getpid(), errorMessage, event->serial, event->error_code, event->request_code, event->minor_code); >+ WTFLogAlways(errorFormatString, getCurrentProcessID(), errorMessage, event->serial, event->error_code, event->request_code, event->minor_code); > > if (m_policy == Policy::Crash) > CRASH(); >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 13f3ad7ac87..4f445315180 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,19 @@ >+2018-06-19 Don Olmstead <don.olmstead@sony.com> >+ >+ Use getCurrentProcessID over getpid >+ https://bugs.webkit.org/show_bug.cgi?id=186813 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * Platform/IPC/unix/ConnectionUnix.cpp: >+ (IPC::Connection::readyReadHandler): >+ * Shared/WebMemorySampler.cpp: >+ (WebKit::WebMemorySampler::initializeTimers): >+ (WebKit::WebMemorySampler::stop): >+ (WebKit::WebMemorySampler::writeHeaders): >+ * WebProcess/Storage/WebSWContextManagerConnection.cpp: >+ (WebKit::WebSWContextManagerConnection::installServiceWorker): >+ > 2018-06-19 Wenson Hsieh <wenson_hsieh@apple.com> > > [WebKit on watchOS] Vend username text content type when using scribble in login fields >diff --git a/Source/WebKit/Platform/IPC/unix/ConnectionUnix.cpp b/Source/WebKit/Platform/IPC/unix/ConnectionUnix.cpp >index 3c46394e2e3..9da965c13d7 100644 >--- a/Source/WebKit/Platform/IPC/unix/ConnectionUnix.cpp >+++ b/Source/WebKit/Platform/IPC/unix/ConnectionUnix.cpp >@@ -32,11 +32,11 @@ > #include "SharedMemory.h" > #include "UnixMessage.h" > #include <sys/socket.h> >-#include <unistd.h> > #include <errno.h> > #include <fcntl.h> > #include <poll.h> > #include <wtf/Assertions.h> >+#include <wtf/ProcessID.h> > #include <wtf/StdLibExtras.h> > #include <wtf/UniStdExtras.h> > >@@ -308,7 +308,7 @@ void Connection::readyReadHandler() > return; > > if (m_isConnected) { >- WTFLogAlways("Error receiving IPC message on socket %d in process %d: %s", m_socketDescriptor, getpid(), strerror(errno)); >+ WTFLogAlways("Error receiving IPC message on socket %d in process %d: %s", m_socketDescriptor, getCurrentProcessID(), strerror(errno)); > connectionDidClose(); > } > return; >diff --git a/Source/WebKit/Shared/WebMemorySampler.cpp b/Source/WebKit/Shared/WebMemorySampler.cpp >index 92771896f31..f6c792cbbfc 100644 >--- a/Source/WebKit/Shared/WebMemorySampler.cpp >+++ b/Source/WebKit/Shared/WebMemorySampler.cpp >@@ -29,7 +29,7 @@ > #if ENABLE(MEMORY_SAMPLER) > > #include <stdio.h> >-#include <unistd.h> >+#include <wtf/ProcessID.h> > #include <wtf/text/CString.h> > #include <wtf/text/StringBuilder.h> > >@@ -89,7 +89,7 @@ void WebMemorySampler::start(SandboxExtension::Handle&& sampleLogFileHandle, con > void WebMemorySampler::initializeTimers(double interval) > { > m_sampleTimer.startRepeating(1_s); >- printf("Started memory sampler for process %s %d", processName().utf8().data(), getpid()); >+ printf("Started memory sampler for process %s %d", processName().utf8().data(), getCurrentProcessID()); > if (interval > 0) { > m_stopTimer.startOneShot(1_s * interval); > printf(" for a interval of %g seconds", interval); >@@ -106,7 +106,7 @@ void WebMemorySampler::stop() > m_sampleTimer.stop(); > FileSystem::closeFile(m_sampleLogFile); > >- printf("Stopped memory sampler for process %s %d\n", processName().utf8().data(), getpid()); >+ printf("Stopped memory sampler for process %s %d\n", processName().utf8().data(), getCurrentProcessID()); > // Flush stdout buffer so python script can be guaranteed to read up to this point. > fflush(stdout); > m_isRunning = false; >@@ -143,7 +143,7 @@ void WebMemorySampler::initializeSandboxedLogFile(SandboxExtension::Handle&& sam > > void WebMemorySampler::writeHeaders() > { >- String processDetails = String::format("Process: %s Pid: %d\n", processName().utf8().data(), getpid()); >+ String processDetails = String::format("Process: %s Pid: %d\n", processName().utf8().data(), getCurrentProcessID()); > > CString utf8String = processDetails.utf8(); > FileSystem::writeToFile(m_sampleLogFile, utf8String.data(), utf8String.length()); >diff --git a/Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.cpp b/Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.cpp >index faa7e39da36..2cfb3ca1d3c 100644 >--- a/Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.cpp >+++ b/Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.cpp >@@ -57,6 +57,7 @@ > #include <WebCore/ServiceWorkerJobDataIdentifier.h> > #include <WebCore/UserAgent.h> > #include <pal/SessionID.h> >+#include <wtf/ProcessID.h> > > #if USE(QUICK_LOOK) > #include <WebCore/PreviewLoaderClient.h> >@@ -160,7 +161,7 @@ void WebSWContextManagerConnection::installServiceWorker(const ServiceWorkerCont > auto serviceWorkerThreadProxy = ServiceWorkerThreadProxy::create(WTFMove(pageConfiguration), data, sessionID, String { m_userAgent }, WebProcess::singleton().cacheStorageProvider(), m_storageBlockingPolicy); > SWContextManager::singleton().registerServiceWorkerThreadForInstall(WTFMove(serviceWorkerThreadProxy)); > >- LOG(ServiceWorker, "Context process PID: %i created worker thread\n", getpid()); >+ LOG(ServiceWorker, "Context process PID: %i created worker thread\n", getCurrentProcessID()); > } > > void WebSWContextManagerConnection::setUserAgent(String&& userAgent)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 186813
:
343079
|
343080
|
343092