Index: public/web/WebServiceWorkerContextProxy.h |
diff --git a/public/web/WebServiceWorkerContextProxy.h b/public/web/WebServiceWorkerContextProxy.h |
index 6c6328d0bff08558f93467121aed29e30a8854f9..a53b90fb8685637a11cc4333f8a86d5d0a4c831d 100644 |
--- a/public/web/WebServiceWorkerContextProxy.h |
+++ b/public/web/WebServiceWorkerContextProxy.h |
@@ -33,6 +33,12 @@ |
#include "public/platform/WebMessagePortChannel.h" |
+namespace v8 { |
+class Context; |
+template <class T> |
+class Handle; |
+} |
+ |
namespace blink { |
class WebServiceWorkerRequest; |
@@ -56,6 +62,11 @@ public: |
// Once the ServiceWorker has finished handling the sync event |
// didHandleSyncEvent is called on the context client. |
virtual void dispatchSyncEvent(int syncEventID) = 0; |
+ |
+ // Returns the raw v8 context for the Service Worker. This must be called |
+ // with an active HandleScope, and the handle is non-null in non-cleanup |
+ // tasks from workerContextStarted() to willDestroyWorkerContext(). |
+ virtual v8::Handle<v8::Context> v8Context() = 0; |
}; |
} // namespace blink |