Make ScriptExecutionContext::Task work in terms of wtf::NoncopyableFunction instead...
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 30 May 2016 04:30:22 +0000 (04:30 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 30 May 2016 04:30:22 +0000 (04:30 +0000)
commit56310a1f1c48ed42eb94024132d4441cecc1339e
tree6d826d201361c0788d88b63c4c985dbaf4672947
parent02241784dc48e586eb45b46bb16e73d4905d595f
Make ScriptExecutionContext::Task work in terms of wtf::NoncopyableFunction instead of std::function.
https://bugs.webkit.org/show_bug.cgi?id=158187

Reviewed by Chris Dumez.

No new tests (Refactor, no behavior change).

Also make postTask take an rvalue reference.

* bindings/js/JSDOMGlobalObjectTask.cpp:
(WebCore::JSGlobalObjectTask::JSGlobalObjectTask):

* dom/Document.cpp:
(WebCore::Document::postTask):
* dom/Document.h:

* dom/ScriptExecutionContext.h:
(WebCore::ScriptExecutionContext::Task::Task):

* workers/WorkerGlobalScope.cpp:
(WebCore::WorkerGlobalScope::postTask):
* workers/WorkerGlobalScope.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201496 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/bindings/js/JSDOMGlobalObjectTask.cpp
Source/WebCore/dom/Document.cpp
Source/WebCore/dom/Document.h
Source/WebCore/dom/ScriptExecutionContext.h
Source/WebCore/workers/WorkerGlobalScope.cpp
Source/WebCore/workers/WorkerGlobalScope.h