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

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

Issue 2702213004: Add security checks to scheduled actions (Closed)
Patch Set: updates Created 3 years, 10 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
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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 class LocalFrame; 44 class LocalFrame;
45 class ExecutionContext; 45 class ExecutionContext;
46 class WorkerGlobalScope; 46 class WorkerGlobalScope;
47 47
48 class ScheduledAction final 48 class ScheduledAction final
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 ExecutionContext* target,
54 const ScriptValue& handler, 55 const ScriptValue& handler,
55 const Vector<ScriptValue>& arguments); 56 const Vector<ScriptValue>& arguments);
56 static ScheduledAction* create(ScriptState*, const String& handler); 57 static ScheduledAction* create(ScriptState*,
58 ExecutionContext* target,
59 const String& handler);
57 60
58 ~ScheduledAction(); 61 ~ScheduledAction();
59 void dispose(); 62 void dispose();
60 63
61 DECLARE_TRACE(); 64 DECLARE_TRACE();
62 65
63 void execute(ExecutionContext*); 66 void execute(ExecutionContext*);
64 67
65 private: 68 private:
66 ScheduledAction(ScriptState*, 69 ScheduledAction(ScriptState*,
67 const ScriptValue& handler, 70 const ScriptValue& handler,
68 const Vector<ScriptValue>& arguments); 71 const Vector<ScriptValue>& arguments);
69 ScheduledAction(ScriptState*, const String& handler); 72 ScheduledAction(ScriptState*, const String& handler);
70 73
71 void execute(LocalFrame*); 74 void execute(LocalFrame*);
72 void execute(WorkerGlobalScope*); 75 void execute(WorkerGlobalScope*);
73 void createLocalHandlesForArgs(Vector<v8::Local<v8::Value>>* handles); 76 void createLocalHandlesForArgs(Vector<v8::Local<v8::Value>>* handles);
74 77
75 ScriptStateProtectingContext m_scriptState; 78 ScriptStateProtectingContext m_scriptState;
76 ScopedPersistent<v8::Function> m_function; 79 ScopedPersistent<v8::Function> m_function;
77 V8PersistentValueVector<v8::Value> m_info; 80 V8PersistentValueVector<v8::Value> m_info;
78 ScriptSourceCode m_code; 81 ScriptSourceCode m_code;
79 }; 82 };
80 83
81 } // namespace blink 84 } // namespace blink
82 85
83 #endif // ScheduledAction 86 #endif // ScheduledAction
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/TestExpectations ('k') | third_party/WebKit/Source/bindings/core/v8/ScheduledAction.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698