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

Unified Diff: Source/core/workers/WorkerThread.h

Issue 857193004: [NOT READY FOR REVIEW YET]workers: Some refactoring to allow creating new kind of worker threads Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: . Created 5 years, 11 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/WorkerGlobalScope.cpp ('k') | Source/core/workers/WorkerThread.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/workers/WorkerThread.h
diff --git a/Source/core/workers/WorkerThread.h b/Source/core/workers/WorkerThread.h
index 0e22f241413ddc90818f9136cb38981ef0010074..660cde5e8f3e2c4aff45c96b4cc2314d721220cf 100644
--- a/Source/core/workers/WorkerThread.h
+++ b/Source/core/workers/WorkerThread.h
@@ -39,6 +39,10 @@
#include "wtf/PassRefPtr.h"
#include "wtf/RefCounted.h"
+namespace v8 {
+class Isolate;
+}
+
namespace blink {
class WebWaitableEvent;
@@ -63,6 +67,9 @@ public:
virtual void start();
virtual void stop();
+ virtual v8::Isolate* initializeIsolate();
+ virtual PassOwnPtr<WebThreadSupportingGC> createWebThreadSupportingGC();
+
// Can be used to wait for this worker thread to shut down.
// (This is signalled on the main thread, so it's assumed to be waited on the worker context thread)
WebWaitableEvent* shutdownEvent() { return m_shutdownEvent.get(); }
@@ -93,6 +100,7 @@ public:
static unsigned workerThreadCount();
PlatformThreadId platformThreadId() const;
+ v8::Isolate* isolate() const;
void interruptAndDispatchInspectorCommands();
void setWorkerInspectorController(WorkerInspectorController*);
@@ -138,6 +146,8 @@ private:
// Used to signal thread termination.
OwnPtr<WebWaitableEvent> m_terminationEvent;
+ v8::Isolate* m_isolate;
+
// FIXME: This has to be last because of crbug.com/401397 - the
// WorkerThread might get deleted before it had a chance to properly
// shut down. By deleting the WebThread first, we can guarantee that
« no previous file with comments | « Source/core/workers/WorkerGlobalScope.cpp ('k') | Source/core/workers/WorkerThread.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698