Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(439)

Unified Diff: third_party/WebKit/Source/core/workers/WorkerBackingThread.h

Issue 2335063003: Prepare DedicatedWorker for per thread heap (Closed)
Patch Set: fix Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/workers/WorkerBackingThread.h
diff --git a/third_party/WebKit/Source/core/workers/WorkerBackingThread.h b/third_party/WebKit/Source/core/workers/WorkerBackingThread.h
index c47a3ac402232c12f458a52bc08f9f741512da9e..d4f1efe0ea9dcb9296a8784ba8ac785f596310d9 100644
--- a/third_party/WebKit/Source/core/workers/WorkerBackingThread.h
+++ b/third_party/WebKit/Source/core/workers/WorkerBackingThread.h
@@ -6,6 +6,7 @@
#define WorkerBackingThread_h
#include "core/CoreExport.h"
+#include "platform/heap/ThreadState.h"
#include "wtf/Forward.h"
#include "wtf/PtrUtil.h"
#include "wtf/ThreadingPrimitives.h"
@@ -27,12 +28,12 @@ class WebThreadSupportingGC;
// WorkerGlobalScopes) can share one WorkerBackingThread.
class CORE_EXPORT WorkerBackingThread final {
public:
- static std::unique_ptr<WorkerBackingThread> create(const char* name) { return wrapUnique(new WorkerBackingThread(name, false)); }
+ static std::unique_ptr<WorkerBackingThread> create(const char* name, BlinkGC::ThreadHeapMode threadHeapMode) { return wrapUnique(new WorkerBackingThread(name, false, threadHeapMode)); }
static std::unique_ptr<WorkerBackingThread> create(WebThread* thread) { return wrapUnique(new WorkerBackingThread(thread, false)); }
// These are needed to suppress leak reports. See
// https://crbug.com/590802 and https://crbug.com/v8/1428.
- static std::unique_ptr<WorkerBackingThread> createForTest(const char* name) { return wrapUnique(new WorkerBackingThread(name, true)); }
+ static std::unique_ptr<WorkerBackingThread> createForTest(const char* name, BlinkGC::ThreadHeapMode threadHeapMode) { return wrapUnique(new WorkerBackingThread(name, true, threadHeapMode)); }
static std::unique_ptr<WorkerBackingThread> createForTest(WebThread* thread) { return wrapUnique(new WorkerBackingThread(thread, true)); }
~WorkerBackingThread();
@@ -58,7 +59,7 @@ public:
static void setRAILModeOnWorkerThreadIsolates(v8::RAILMode);
private:
- WorkerBackingThread(const char* name, bool shouldCallGCOnShutdown);
+ WorkerBackingThread(const char* name, bool shouldCallGCOnShutdown, BlinkGC::ThreadHeapMode);
WorkerBackingThread(WebThread*, bool shouldCallGCOnSHutdown);
std::unique_ptr<WebThreadSupportingGC> m_backingThread;

Powered by Google App Engine
This is Rietveld 408576698