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

Side by Side Diff: third_party/WebKit/Source/core/workers/WorkerBackingThread.h

Issue 1953483002: Revert of Do V8 GC ASAP if system memory is pressured (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef WorkerBackingThread_h 5 #ifndef WorkerBackingThread_h
6 #define WorkerBackingThread_h 6 #define WorkerBackingThread_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "wtf/Forward.h" 9 #include "wtf/Forward.h"
10 #include "wtf/OwnPtr.h" 10 #include "wtf/OwnPtr.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 } 54 }
55 55
56 WebThreadSupportingGC& backingThread() 56 WebThreadSupportingGC& backingThread()
57 { 57 {
58 DCHECK(m_backingThread); 58 DCHECK(m_backingThread);
59 return *m_backingThread; 59 return *m_backingThread;
60 } 60 }
61 61
62 v8::Isolate* isolate() { return m_isolate; } 62 v8::Isolate* isolate() { return m_isolate; }
63 63
64 static void MemoryPressureNotificationToWorkerThreadIsolates(
65 v8::MemoryPressureLevel);
66
67 private: 64 private:
68 WorkerBackingThread(const char* name, bool shouldCallGCOnShutdown); 65 WorkerBackingThread(const char* name, bool shouldCallGCOnShutdown);
69 WorkerBackingThread(WebThread*, bool shouldCallGCOnSHutdown); 66 WorkerBackingThread(WebThread*, bool shouldCallGCOnSHutdown);
70 void initialize(); 67 void initialize();
71 void shutdown(); 68 void shutdown();
72 69
73 // Protects |m_workerScriptCount|. 70 // Protects |m_workerScriptCount|.
74 Mutex m_mutex; 71 Mutex m_mutex;
75 OwnPtr<WebThreadSupportingGC> m_backingThread; 72 OwnPtr<WebThreadSupportingGC> m_backingThread;
76 v8::Isolate* m_isolate = nullptr; 73 v8::Isolate* m_isolate = nullptr;
77 unsigned m_workerScriptCount = 0; 74 unsigned m_workerScriptCount = 0;
78 bool m_isOwningThread; 75 bool m_isOwningThread;
79 bool m_shouldCallGCOnShutdown; 76 bool m_shouldCallGCOnShutdown;
80 }; 77 };
81 78
82 } // namespace blink 79 } // namespace blink
83 80
84 #endif // WorkerBackingThread_h 81 #endif // WorkerBackingThread_h
OLDNEW
« no previous file with comments | « content/renderer/render_thread_impl.cc ('k') | third_party/WebKit/Source/core/workers/WorkerBackingThread.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698