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

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

Issue 1158443008: compositor-worker: Share a thread and an isolate for compositor workers. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: . Created 5 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/workers/WorkerV8Isolate.h
diff --git a/Source/core/workers/WorkerV8Isolate.h b/Source/core/workers/WorkerV8Isolate.h
new file mode 100644
index 0000000000000000000000000000000000000000..4b728d77b57e67edca28798d4480d3bd567eca50
--- /dev/null
+++ b/Source/core/workers/WorkerV8Isolate.h
@@ -0,0 +1,31 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef WorkerV8Isolate_h
+#define WorkerV8Isolate_h
+
+#include "core/CoreExport.h"
+#include "wtf/OwnPtr.h"
+#include "wtf/PassOwnPtr.h"
+#include <v8.h>
+
+namespace blink {
+
+// A common interface for a worker to manage the v8::Isolate used for the worker.
kinuko 2015/05/31 15:18:24 Please also note about its lifetime (when it's cre
sadrul 2015/06/01 05:24:11 Done.
+class CORE_EXPORT WorkerV8Isolate {
+public:
+ static PassOwnPtr<WorkerV8Isolate> createDefault();
+ virtual ~WorkerV8Isolate() { }
+
+ virtual v8::Isolate* isolate() const = 0;
+ virtual void willDestroy() = 0;
+ virtual void terminateExecution() = 0;
+
+protected:
+ WorkerV8Isolate() { }
+};
+
+} // namespace blink
+
+#endif // WorkerV8Isolate_h

Powered by Google App Engine
This is Rietveld 408576698