| Index: content/shell/renderer/layout_test/webkit_test_runner.cc
|
| diff --git a/content/shell/renderer/layout_test/webkit_test_runner.cc b/content/shell/renderer/layout_test/webkit_test_runner.cc
|
| index 0bda738056669bf608b6412106b20fa9c36ed6b0..b030c97a74536028c24e5d00cac4063f2f521956 100644
|
| --- a/content/shell/renderer/layout_test/webkit_test_runner.cc
|
| +++ b/content/shell/renderer/layout_test/webkit_test_runner.cc
|
| @@ -49,6 +49,7 @@
|
| #include "third_party/WebKit/public/platform/WebRect.h"
|
| #include "third_party/WebKit/public/platform/WebSize.h"
|
| #include "third_party/WebKit/public/platform/WebString.h"
|
| +#include "third_party/WebKit/public/platform/WebThread.h"
|
| #include "third_party/WebKit/public/platform/WebURL.h"
|
| #include "third_party/WebKit/public/platform/WebURLError.h"
|
| #include "third_party/WebKit/public/platform/WebURLRequest.h"
|
| @@ -88,6 +89,7 @@ using blink::WebURLError;
|
| using blink::WebURLRequest;
|
| using blink::WebScreenOrientationType;
|
| using blink::WebTestingSupport;
|
| +using blink::WebThread;
|
| using blink::WebVector;
|
| using blink::WebView;
|
|
|
| @@ -95,11 +97,16 @@ namespace content {
|
|
|
| namespace {
|
|
|
| -void InvokeTaskHelper(void* context) {
|
| - WebTask* task = reinterpret_cast<WebTask*>(context);
|
| - task->run();
|
| - delete task;
|
| -}
|
| +class InvokeTaskHelper : public WebThread::Task {
|
| + public:
|
| + InvokeTaskHelper(scoped_ptr<WebTask> task) : task_(task.Pass()) {}
|
| +
|
| + // WebThread::Task implementation:
|
| + void run() override { task_->run(); }
|
| +
|
| + private:
|
| + scoped_ptr<WebTask> task_;
|
| +};
|
|
|
| class SyncNavigationStateVisitor : public RenderViewVisitor {
|
| public:
|
| @@ -246,14 +253,13 @@ void WebKitTestRunner::PrintMessage(const std::string& message) {
|
| }
|
|
|
| void WebKitTestRunner::PostTask(WebTask* task) {
|
| - Platform::current()->callOnMainThread(InvokeTaskHelper, task);
|
| + Platform::current()->currentThread()->postTask(
|
| + new InvokeTaskHelper(make_scoped_ptr(task)));
|
| }
|
|
|
| void WebKitTestRunner::PostDelayedTask(WebTask* task, long long ms) {
|
| - base::MessageLoop::current()->PostDelayedTask(
|
| - FROM_HERE,
|
| - base::Bind(&WebTask::run, base::Owned(task)),
|
| - base::TimeDelta::FromMilliseconds(ms));
|
| + Platform::current()->currentThread()->postDelayedTask(
|
| + new InvokeTaskHelper(make_scoped_ptr(task)), ms);
|
| }
|
|
|
| WebString WebKitTestRunner::RegisterIsolatedFileSystem(
|
|
|