summaryrefslogtreecommitdiff
path: root/Source/WebCore/bindings/js/ScheduledAction.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/bindings/js/ScheduledAction.h')
-rw-r--r--Source/WebCore/bindings/js/ScheduledAction.h19
1 files changed, 8 insertions, 11 deletions
diff --git a/Source/WebCore/bindings/js/ScheduledAction.h b/Source/WebCore/bindings/js/ScheduledAction.h
index 19add3fe8..dac8579ea 100644
--- a/Source/WebCore/bindings/js/ScheduledAction.h
+++ b/Source/WebCore/bindings/js/ScheduledAction.h
@@ -17,14 +17,13 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef ScheduledAction_h
-#define ScheduledAction_h
+#pragma once
#include "JSDOMBinding.h"
#include <heap/Strong.h>
#include <heap/StrongInlines.h>
+#include <memory>
#include <runtime/JSCell.h>
-#include <wtf/PassOwnPtr.h>
#include <wtf/Vector.h>
#include <wtf/text/WTFString.h>
@@ -46,22 +45,22 @@ namespace WebCore {
class ScheduledAction {
WTF_MAKE_NONCOPYABLE(ScheduledAction); WTF_MAKE_FAST_ALLOCATED;
public:
- static PassOwnPtr<ScheduledAction> create(JSC::ExecState*, DOMWrapperWorld& isolatedWorld, ContentSecurityPolicy*);
+ static std::unique_ptr<ScheduledAction> create(JSC::ExecState*, DOMWrapperWorld& isolatedWorld, ContentSecurityPolicy*);
- void execute(ScriptExecutionContext*);
+ void execute(ScriptExecutionContext&);
private:
ScheduledAction(JSC::ExecState*, JSC::JSValue function, DOMWrapperWorld& isolatedWorld);
ScheduledAction(const String& code, DOMWrapperWorld& isolatedWorld)
- : m_function(*isolatedWorld.vm())
+ : m_function(isolatedWorld.vm())
, m_code(code)
, m_isolatedWorld(&isolatedWorld)
{
}
- void executeFunctionInContext(JSC::JSGlobalObject*, JSC::JSValue thisValue, ScriptExecutionContext*);
- void execute(Document*);
- void execute(WorkerGlobalScope*);
+ void executeFunctionInContext(JSC::JSGlobalObject*, JSC::JSValue thisValue, ScriptExecutionContext&);
+ void execute(Document&);
+ void execute(WorkerGlobalScope&);
JSC::Strong<JSC::Unknown> m_function;
Vector<JSC::Strong<JSC::Unknown>> m_args;
@@ -70,5 +69,3 @@ namespace WebCore {
};
} // namespace WebCore
-
-#endif // ScheduledAction_h