Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / bindings / v8 / ScheduledAction.h
index 014cd91..351ef3b 100644 (file)
 
 #include "bindings/v8/ScopedPersistent.h"
 #include "bindings/v8/ScriptSourceCode.h"
-#include "bindings/v8/UnsafePersistent.h"
+#include "bindings/v8/ScriptState.h"
+#include "bindings/v8/V8PersistentValueVector.h"
 #include <v8.h>
 #include "wtf/Forward.h"
-#include "wtf/Vector.h"
 
 namespace WebCore {
 
@@ -47,8 +47,8 @@ class WorkerGlobalScope;
 class ScheduledAction {
     WTF_MAKE_NONCOPYABLE(ScheduledAction);
 public:
-    ScheduledAction(v8::Handle<v8::Context>, v8::Handle<v8::Function>, int argc, v8::Handle<v8::Value> argv[], v8::Isolate*);
-    ScheduledAction(v8::Handle<v8::Context>, const String&, const KURL&, v8::Isolate*);
+    ScheduledAction(ScriptState*, v8::Handle<v8::Function>, int argc, v8::Handle<v8::Value> argv[], v8::Isolate*);
+    ScheduledAction(ScriptState*, const String&, const KURL&, v8::Isolate*);
     ~ScheduledAction();
 
     void execute(ExecutionContext*);
@@ -58,11 +58,10 @@ private:
     void execute(WorkerGlobalScope*);
     void createLocalHandlesForArgs(Vector<v8::Handle<v8::Value> >* handles);
 
-    ScopedPersistent<v8::Context> m_context;
+    ScriptStateProtectingContext m_scriptState;
     ScopedPersistent<v8::Function> m_function;
-    Vector<UnsafePersistent<v8::Value> > m_info;
+    V8PersistentValueVector<v8::Value> m_info;
     ScriptSourceCode m_code;
-    v8::Isolate* m_isolate;
 };
 
 } // namespace WebCore