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

Side by Side Diff: Source/WebCore/bindings/v8/V8ScheduledAction.h

Issue 8806015: Changes to support a second VM. (Closed) Base URL: svn://svn.chromium.org/dash/experimental/chrome/src/webkit-full
Patch Set: . Created 9 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007-2009 Google Inc. All rights reserved. 2 * Copyright (C) 2007-2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 10 matching lines...) Expand all
21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #ifndef ScheduledAction_h 31 #ifndef V8ScheduledAction_h
32 #define ScheduledAction_h 32 #define V8ScheduledAction_h
33 33
34 #include "OwnHandle.h" 34 #include "OwnHandle.h"
35 #include "ScheduledAction.h"
35 #include "ScriptSourceCode.h" 36 #include "ScriptSourceCode.h"
36 #include "V8GCController.h" 37 #include "V8GCController.h"
37 #include <wtf/Forward.h> 38 #include <wtf/Forward.h>
38 39
39 #include <v8.h> 40 #include <v8.h>
40 41
41 namespace WebCore { 42 namespace WebCore {
42 43
43 class ScriptExecutionContext; 44 class ScriptExecutionContext;
44 class V8Proxy; 45 class V8Proxy;
45 class WorkerContext; 46 class WorkerContext;
46 47
47 class ScheduledAction { 48 class V8ScheduledAction : public ScheduledAction {
48 public: 49 public:
49 ScheduledAction(v8::Handle<v8::Context>, v8::Handle<v8::Function>, int a rgc, v8::Handle<v8::Value> argv[]); 50 V8ScheduledAction(v8::Handle<v8::Context>, v8::Handle<v8::Function>, int argc, v8::Handle<v8::Value> argv[]);
50 explicit ScheduledAction(v8::Handle<v8::Context> context, const WTF::Str ing& code, const KURL& url = KURL()) 51 explicit V8ScheduledAction(v8::Handle<v8::Context> context, const WTF::S tring& code, const KURL& url = KURL())
51 : m_context(context) 52 : m_context(context)
52 , m_argc(0) 53 , m_argc(0)
53 , m_argv(0) 54 , m_argv(0)
54 , m_code(code, url) 55 , m_code(code, url)
55 { 56 {
56 } 57 }
57 58
58 virtual ~ScheduledAction(); 59 virtual ~V8ScheduledAction();
59 virtual void execute(ScriptExecutionContext*); 60 virtual void execute(ScriptExecutionContext*);
60 61
61 private: 62 private:
62 void execute(V8Proxy*); 63 void execute(V8Proxy*);
63 #if ENABLE(WORKERS) 64 #if ENABLE(WORKERS)
64 void execute(WorkerContext*); 65 void execute(WorkerContext*);
65 #endif 66 #endif
66 67
67 OwnHandle<v8::Context> m_context; 68 OwnHandle<v8::Context> m_context;
68 v8::Persistent<v8::Function> m_function; 69 v8::Persistent<v8::Function> m_function;
69 int m_argc; 70 int m_argc;
70 v8::Persistent<v8::Value>* m_argv; 71 v8::Persistent<v8::Value>* m_argv;
71 ScriptSourceCode m_code; 72 ScriptSourceCode m_code;
72 }; 73 };
73 74
74 } // namespace WebCore 75 } // namespace WebCore
75 76
76 #endif // ScheduledAction 77 #endif // V8ScheduledAction_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698