OLD | NEW |
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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 : public GarbageCollectedFinalized<ScheduledAction> { | 49 : public GarbageCollectedFinalized<ScheduledAction> { |
50 WTF_MAKE_NONCOPYABLE(ScheduledAction); | 50 WTF_MAKE_NONCOPYABLE(ScheduledAction); |
51 | 51 |
52 public: | 52 public: |
53 static ScheduledAction* create(ScriptState*, | 53 static ScheduledAction* create(ScriptState*, |
54 const ScriptValue& handler, | 54 const ScriptValue& handler, |
55 const Vector<ScriptValue>& arguments); | 55 const Vector<ScriptValue>& arguments); |
56 static ScheduledAction* create(ScriptState*, const String& handler); | 56 static ScheduledAction* create(ScriptState*, const String& handler); |
57 | 57 |
58 ~ScheduledAction(); | 58 ~ScheduledAction(); |
| 59 void dispose(); |
| 60 |
59 DECLARE_TRACE(); | 61 DECLARE_TRACE(); |
60 | 62 |
61 void execute(ExecutionContext*); | 63 void execute(ExecutionContext*); |
62 | 64 |
63 private: | 65 private: |
64 ScheduledAction(ScriptState*, | 66 ScheduledAction(ScriptState*, |
65 const ScriptValue& handler, | 67 const ScriptValue& handler, |
66 const Vector<ScriptValue>& arguments); | 68 const Vector<ScriptValue>& arguments); |
67 ScheduledAction(ScriptState*, const String& handler); | 69 ScheduledAction(ScriptState*, const String& handler); |
68 | 70 |
69 void execute(LocalFrame*); | 71 void execute(LocalFrame*); |
70 void execute(WorkerGlobalScope*); | 72 void execute(WorkerGlobalScope*); |
71 void createLocalHandlesForArgs(Vector<v8::Local<v8::Value>>* handles); | 73 void createLocalHandlesForArgs(Vector<v8::Local<v8::Value>>* handles); |
72 | 74 |
73 ScriptStateProtectingContext m_scriptState; | 75 ScriptStateProtectingContext m_scriptState; |
74 ScopedPersistent<v8::Function> m_function; | 76 ScopedPersistent<v8::Function> m_function; |
75 V8PersistentValueVector<v8::Value> m_info; | 77 V8PersistentValueVector<v8::Value> m_info; |
76 ScriptSourceCode m_code; | 78 ScriptSourceCode m_code; |
77 }; | 79 }; |
78 | 80 |
79 } // namespace blink | 81 } // namespace blink |
80 | 82 |
81 #endif // ScheduledAction | 83 #endif // ScheduledAction |
OLD | NEW |