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

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

Issue 85263006: Make IDL Callbacks non-refcounted by default (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Patch for landing Created 7 years, 1 month 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 | « Source/core/dom/StringCallback.h ('k') | Source/core/platform/chromium/ChromiumDataObjectItem.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/StringCallback.cpp
diff --git a/Source/core/dom/StringCallback.cpp b/Source/core/dom/StringCallback.cpp
index 048dda57c1103c3b74d80c0f61f1accf188df37e..1a1a5fc74953dfef4b73f365233dd49003abd891 100644
--- a/Source/core/dom/StringCallback.cpp
+++ b/Source/core/dom/StringCallback.cpp
@@ -41,7 +41,7 @@ namespace {
class DispatchCallbackTask : public ExecutionContextTask {
public:
- static PassOwnPtr<DispatchCallbackTask> create(PassRefPtr<StringCallback> callback, const String& data)
+ static PassOwnPtr<DispatchCallbackTask> create(PassOwnPtr<StringCallback> callback, const String& data)
{
return adoptPtr(new DispatchCallbackTask(callback, data));
}
@@ -52,21 +52,21 @@ public:
}
private:
- DispatchCallbackTask(PassRefPtr<StringCallback> callback, const String& data)
+ DispatchCallbackTask(PassOwnPtr<StringCallback> callback, const String& data)
: m_callback(callback)
, m_data(data)
{
}
- RefPtr<StringCallback> m_callback;
+ OwnPtr<StringCallback> m_callback;
const String m_data;
};
} // namespace
-void StringCallback::scheduleCallback(ExecutionContext* context, const String& data)
+void StringCallback::scheduleCallback(PassOwnPtr<StringCallback> callback, ExecutionContext* context, const String& data)
{
- context->postTask(DispatchCallbackTask::create(this, data));
+ context->postTask(DispatchCallbackTask::create(callback, data));
}
} // namespace WebCore
« no previous file with comments | « Source/core/dom/StringCallback.h ('k') | Source/core/platform/chromium/ChromiumDataObjectItem.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698