Title: [229674] trunk/Source/WebCore
- Revision
- 229674
- Author
- [email protected]
- Date
- 2018-03-16 10:38:23 -0700 (Fri, 16 Mar 2018)
Log Message
Name Service Worker threads differently from regular Worker threads
https://bugs.webkit.org/show_bug.cgi?id=183698
Reviewed by Chris Dumez.
No observable change of behavior.
For debugging purposes, knowing that a thread is a service worker thread might help give context.
It might also identify on a crash log whether the process is a service worker process or a regular web process.
* workers/WorkerThread.cpp:
(WebCore::WorkerThread::start):
* workers/WorkerThread.h:
(WebCore::WorkerThread::isServiceWorkerThread const):
* workers/service/context/ServiceWorkerThread.h:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (229673 => 229674)
--- trunk/Source/WebCore/ChangeLog 2018-03-16 17:31:54 UTC (rev 229673)
+++ trunk/Source/WebCore/ChangeLog 2018-03-16 17:38:23 UTC (rev 229674)
@@ -1,5 +1,22 @@
2018-03-16 Youenn Fablet <[email protected]>
+ Name Service Worker threads differently from regular Worker threads
+ https://bugs.webkit.org/show_bug.cgi?id=183698
+
+ Reviewed by Chris Dumez.
+
+ No observable change of behavior.
+ For debugging purposes, knowing that a thread is a service worker thread might help give context.
+ It might also identify on a crash log whether the process is a service worker process or a regular web process.
+
+ * workers/WorkerThread.cpp:
+ (WebCore::WorkerThread::start):
+ * workers/WorkerThread.h:
+ (WebCore::WorkerThread::isServiceWorkerThread const):
+ * workers/service/context/ServiceWorkerThread.h:
+
+2018-03-16 Youenn Fablet <[email protected]>
+
IceCandidates leak on webrtc/datachannel/basic.html and other tests
https://bugs.webkit.org/show_bug.cgi?id=183676
<rdar://problem/36116228>
Modified: trunk/Source/WebCore/workers/WorkerThread.cpp (229673 => 229674)
--- trunk/Source/WebCore/workers/WorkerThread.cpp 2018-03-16 17:31:54 UTC (rev 229673)
+++ trunk/Source/WebCore/workers/WorkerThread.cpp 2018-03-16 17:38:23 UTC (rev 229674)
@@ -140,7 +140,7 @@
m_evaluateCallback = WTFMove(evaluateCallback);
- m_thread = Thread::create("WebCore: Worker", [this] {
+ m_thread = Thread::create(isServiceWorkerThread() ? "WebCore: Service Worker" : "WebCore: Worker", [this] {
workerThread();
});
}
Modified: trunk/Source/WebCore/workers/WorkerThread.h (229673 => 229674)
--- trunk/Source/WebCore/workers/WorkerThread.h 2018-03-16 17:31:54 UTC (rev 229673)
+++ trunk/Source/WebCore/workers/WorkerThread.h 2018-03-16 17:38:23 UTC (rev 229674)
@@ -102,6 +102,7 @@
private:
void workerThread();
+ virtual bool isServiceWorkerThread() const { return false; }
RefPtr<Thread> m_thread;
WorkerRunLoop m_runLoop;
Modified: trunk/Source/WebCore/workers/service/context/ServiceWorkerThread.h (229673 => 229674)
--- trunk/Source/WebCore/workers/service/context/ServiceWorkerThread.h 2018-03-16 17:31:54 UTC (rev 229673)
+++ trunk/Source/WebCore/workers/service/context/ServiceWorkerThread.h 2018-03-16 17:38:23 UTC (rev 229674)
@@ -72,6 +72,8 @@
private:
WEBCORE_EXPORT ServiceWorkerThread(const ServiceWorkerContextData&, PAL::SessionID, String&& userAgent, WorkerLoaderProxy&, WorkerDebuggerProxy&, IDBClient::IDBConnectionProxy*, SocketProvider*);
+ bool isServiceWorkerThread() const final { return true; }
+
ServiceWorkerContextData m_data;
WorkerObjectProxy& m_workerObjectProxy;
};
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes