| 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 27 matching lines...) Expand all Loading... |
| 38 #include "platform/heap/Handle.h" | 38 #include "platform/heap/Handle.h" |
| 39 #include "wtf/Forward.h" | 39 #include "wtf/Forward.h" |
| 40 #include <v8.h> | 40 #include <v8.h> |
| 41 | 41 |
| 42 namespace blink { | 42 namespace blink { |
| 43 | 43 |
| 44 class LocalFrame; | 44 class LocalFrame; |
| 45 class ExecutionContext; | 45 class ExecutionContext; |
| 46 class WorkerGlobalScope; | 46 class WorkerGlobalScope; |
| 47 | 47 |
| 48 class ScheduledAction final : public NoBaseWillBeGarbageCollectedFinalized<Sched
uledAction> { | 48 class ScheduledAction final : public GarbageCollectedFinalized<ScheduledAction>
{ |
| 49 WTF_MAKE_NONCOPYABLE(ScheduledAction); | 49 WTF_MAKE_NONCOPYABLE(ScheduledAction); |
| 50 USING_FAST_MALLOC_WILL_BE_REMOVED(ScheduledAction); | |
| 51 public: | 50 public: |
| 52 static PassOwnPtrWillBeRawPtr<ScheduledAction> create(ScriptState*, const Sc
riptValue& handler, const Vector<ScriptValue>& arguments); | 51 static RawPtr<ScheduledAction> create(ScriptState*, const ScriptValue& handl
er, const Vector<ScriptValue>& arguments); |
| 53 static PassOwnPtrWillBeRawPtr<ScheduledAction> create(ScriptState*, const St
ring& handler); | 52 static RawPtr<ScheduledAction> create(ScriptState*, const String& handler); |
| 54 | 53 |
| 55 ~ScheduledAction(); | 54 ~ScheduledAction(); |
| 56 DECLARE_TRACE(); | 55 DECLARE_TRACE(); |
| 57 | 56 |
| 58 void execute(ExecutionContext*); | 57 void execute(ExecutionContext*); |
| 59 | 58 |
| 60 private: | 59 private: |
| 61 ScheduledAction(ScriptState*, const ScriptValue& handler, const Vector<Scrip
tValue>& arguments); | 60 ScheduledAction(ScriptState*, const ScriptValue& handler, const Vector<Scrip
tValue>& arguments); |
| 62 ScheduledAction(ScriptState*, const String& handler); | 61 ScheduledAction(ScriptState*, const String& handler); |
| 63 | 62 |
| 64 void execute(LocalFrame*); | 63 void execute(LocalFrame*); |
| 65 void execute(WorkerGlobalScope*); | 64 void execute(WorkerGlobalScope*); |
| 66 void createLocalHandlesForArgs(Vector<v8::Local<v8::Value>>* handles); | 65 void createLocalHandlesForArgs(Vector<v8::Local<v8::Value>>* handles); |
| 67 | 66 |
| 68 ScriptStateProtectingContext m_scriptState; | 67 ScriptStateProtectingContext m_scriptState; |
| 69 ScopedPersistent<v8::Function> m_function; | 68 ScopedPersistent<v8::Function> m_function; |
| 70 V8PersistentValueVector<v8::Value> m_info; | 69 V8PersistentValueVector<v8::Value> m_info; |
| 71 ScriptSourceCode m_code; | 70 ScriptSourceCode m_code; |
| 72 }; | 71 }; |
| 73 | 72 |
| 74 } // namespace blink | 73 } // namespace blink |
| 75 | 74 |
| 76 #endif // ScheduledAction | 75 #endif // ScheduledAction |
| OLD | NEW |