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

Unified Diff: third_party/WebKit/Source/core/dom/StringCallback.cpp

Issue 1766903002: Remove ExecutionContextTask subclasses that have task names (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Kuroneko_EC7_Document
Patch Set: Add a comment Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/webdatabase/DatabaseManager.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/webdatabase/DatabaseManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698