WebKit Bugzilla
Attachment 343092 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), 3.94 KB, created by
Don Olmstead
on 2018-06-19 13:47:25 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Don Olmstead
Created:
2018-06-19 13:47:25 PDT
Size:
3.94 KB
patch
obsolete
>diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 13f3ad7ac87..365d6ec8897 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,17 @@ >+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!). >+ >+ * 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/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