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

Unified Diff: Source/platform/UIWebThreadSupportingGC.h

Issue 474683003: Not for review - Rebase of crrev.com/62833003 Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: . Created 6 years, 2 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
« no previous file with comments | « Source/core/workers/WorkerThreadStartupData.cpp ('k') | Source/platform/UIWebThreadSupportingGC.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/UIWebThreadSupportingGC.h
diff --git a/Source/platform/UIWebThreadSupportingGC.h b/Source/platform/UIWebThreadSupportingGC.h
new file mode 100644
index 0000000000000000000000000000000000000000..925a9a01a5ffe9248b235fcde7286b2f09aa8b4c
--- /dev/null
+++ b/Source/platform/UIWebThreadSupportingGC.h
@@ -0,0 +1,31 @@
+#ifndef UIWEBTHREADSUPPORTINGGC
+#define UIWEBTHREADSUPPORTINGGC
+
+#include "WebThreadSupportingGC.h"
+#include "wtf/HashMap.h"
+
+namespace blink {
+
+class PLATFORM_EXPORT UIWebThreadSupportingGC : public WebThreadSupportingGC {
+ WTF_MAKE_NONCOPYABLE(UIWebThreadSupportingGC);
+ public:
+ static PassOwnPtr<UIWebThreadSupportingGC> create(const char* name);
+ static UIWebThreadSupportingGC* get(WebThread* t);
+
+ virtual void attachGC() override;
+ virtual void detachGC() override;
+
+ private:
+ // should never create 2 UIWebThreadSupportingGCs pointing to the same thread
+ UIWebThreadSupportingGC(const char* name);
+ UIWebThreadSupportingGC(WebThread* t);
+
+ typedef HashMap<WebThread*, UIWebThreadSupportingGC*> ThreadMap;
+ static ThreadMap* m_threadMap;
+
+ int m_attachedThreads;
+};
+
+}
+
+#endif /* ifndef UIWEBTHREADSUPPORTINGGC */
« no previous file with comments | « Source/core/workers/WorkerThreadStartupData.cpp ('k') | Source/platform/UIWebThreadSupportingGC.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698