| Index: third_party/WebKit/Source/core/dom/StringCallback.cpp
|
| diff --git a/third_party/WebKit/Source/core/dom/StringCallback.cpp b/third_party/WebKit/Source/core/dom/StringCallback.cpp
|
| index 80d797773cdde645d0cde625a2e3a388c6d61675..a381eb125bfe283c50fc00ab269f438d5c2a15da 100644
|
| --- a/third_party/WebKit/Source/core/dom/StringCallback.cpp
|
| +++ b/third_party/WebKit/Source/core/dom/StringCallback.cpp
|
| @@ -33,41 +33,13 @@
|
| #include "core/dom/ExecutionContext.h"
|
| #include "core/dom/ExecutionContextTask.h"
|
| #include "public/platform/WebTraceLocation.h"
|
| -#include "wtf/PtrUtil.h"
|
| #include "wtf/text/WTFString.h"
|
|
|
| namespace blink {
|
|
|
| -namespace {
|
| -
|
| -class DispatchCallbackTask final : public ExecutionContextTask {
|
| -public:
|
| - static std::unique_ptr<DispatchCallbackTask> create(StringCallback* callback, const String& data)
|
| - {
|
| - return wrapUnique(new DispatchCallbackTask(callback, data));
|
| - }
|
| -
|
| - void performTask(ExecutionContext*) override
|
| - {
|
| - m_callback->handleEvent(m_data);
|
| - }
|
| -
|
| -private:
|
| - DispatchCallbackTask(StringCallback* callback, const String& data)
|
| - : m_callback(callback)
|
| - , m_data(data)
|
| - {
|
| - }
|
| -
|
| - Persistent<StringCallback> m_callback;
|
| - const String m_data;
|
| -};
|
| -
|
| -} // namespace
|
| -
|
| void StringCallback::scheduleCallback(StringCallback* callback, ExecutionContext* context, const String& data, const String& instrumentationName)
|
| {
|
| - context->postTask(BLINK_FROM_HERE, DispatchCallbackTask::create(callback, data), instrumentationName);
|
| + context->postTask(BLINK_FROM_HERE, createSameThreadTask(&StringCallback::handleEvent, wrapPersistent(callback), data), instrumentationName);
|
| }
|
|
|
| } // namespace blink
|
|
|