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

Side by Side Diff: Source/bindings/core/v8/ScheduledAction.h

Issue 847803002: Make ScriptStreamer and dependents Oilpan friendly. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add ScriptSourceCode::isNull() comment Created 5 years, 11 months 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 17 matching lines...) Expand all
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 ScheduledAction_h
32 #define ScheduledAction_h 32 #define ScheduledAction_h
33 33
34 #include "bindings/core/v8/ScopedPersistent.h" 34 #include "bindings/core/v8/ScopedPersistent.h"
35 #include "bindings/core/v8/ScriptSourceCode.h" 35 #include "bindings/core/v8/ScriptSourceCode.h"
36 #include "bindings/core/v8/ScriptState.h" 36 #include "bindings/core/v8/ScriptState.h"
37 #include "bindings/core/v8/V8PersistentValueVector.h" 37 #include "bindings/core/v8/V8PersistentValueVector.h"
38 #include "platform/heap/Handle.h"
38 #include "wtf/Forward.h" 39 #include "wtf/Forward.h"
39 #include <v8.h> 40 #include <v8.h>
40 41
41 namespace blink { 42 namespace blink {
42 43
43 class LocalFrame; 44 class LocalFrame;
44 class ExecutionContext; 45 class ExecutionContext;
45 class WorkerGlobalScope; 46 class WorkerGlobalScope;
46 47
47 class ScheduledAction { 48 class ScheduledAction final : public NoBaseWillBeGarbageCollectedFinalized<Sched uledAction> {
48 WTF_MAKE_NONCOPYABLE(ScheduledAction); 49 WTF_MAKE_NONCOPYABLE(ScheduledAction);
49 public: 50 public:
50 static PassOwnPtr<ScheduledAction> create(ScriptState*, const ScriptValue& h andler, const Vector<ScriptValue>& arguments); 51 static PassOwnPtrWillBeRawPtr<ScheduledAction> create(ScriptState*, const Sc riptValue& handler, const Vector<ScriptValue>& arguments);
51 static PassOwnPtr<ScheduledAction> create(ScriptState*, const String& handle r); 52 static PassOwnPtrWillBeRawPtr<ScheduledAction> create(ScriptState*, const St ring& handler);
52 53
53 ~ScheduledAction(); 54 ~ScheduledAction();
55 void trace(Visitor*);
54 56
55 void execute(ExecutionContext*); 57 void execute(ExecutionContext*);
56 58
57 private: 59 private:
58 ScheduledAction(ScriptState*, const ScriptValue& handler, const Vector<Scrip tValue>& arguments); 60 ScheduledAction(ScriptState*, const ScriptValue& handler, const Vector<Scrip tValue>& arguments);
59 ScheduledAction(ScriptState*, const String& handler); 61 ScheduledAction(ScriptState*, const String& handler);
60 62
61 void execute(LocalFrame*); 63 void execute(LocalFrame*);
62 void execute(WorkerGlobalScope*); 64 void execute(WorkerGlobalScope*);
63 void createLocalHandlesForArgs(Vector<v8::Handle<v8::Value> >* handles); 65 void createLocalHandlesForArgs(Vector<v8::Handle<v8::Value> >* handles);
64 66
65 ScriptStateProtectingContext m_scriptState; 67 ScriptStateProtectingContext m_scriptState;
66 ScopedPersistent<v8::Function> m_function; 68 ScopedPersistent<v8::Function> m_function;
67 V8PersistentValueVector<v8::Value> m_info; 69 V8PersistentValueVector<v8::Value> m_info;
68 ScriptSourceCode m_code; 70 ScriptSourceCode m_code;
69 }; 71 };
70 72
71 } // namespace blink 73 } // namespace blink
72 74
73 #endif // ScheduledAction 75 #endif // ScheduledAction
OLDNEW
« no previous file with comments | « Source/bindings/core/v8/PageScriptDebugServer.cpp ('k') | Source/bindings/core/v8/ScheduledAction.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698