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

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

Issue 2550373005: Make WebTaskRunner ThreadSafeRefCounted (Closed)
Patch Set: +DISALLOW_COPY_AND_ASSIGN for win build fix Created 3 years, 11 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
Index: third_party/WebKit/Source/core/dom/TaskRunnerHelper.cpp
diff --git a/third_party/WebKit/Source/core/dom/TaskRunnerHelper.cpp b/third_party/WebKit/Source/core/dom/TaskRunnerHelper.cpp
index 2d0ba638497170341d287eb5b092f3af14dd607b..c7f578b378db1da39959338cce06ad95dc3d395a 100644
--- a/third_party/WebKit/Source/core/dom/TaskRunnerHelper.cpp
+++ b/third_party/WebKit/Source/core/dom/TaskRunnerHelper.cpp
@@ -13,7 +13,7 @@
namespace blink {
-WebTaskRunner* TaskRunnerHelper::get(TaskType type, LocalFrame* frame) {
+RefPtr<WebTaskRunner> TaskRunnerHelper::get(TaskType type, LocalFrame* frame) {
// TODO(haraken): Optimize the mapping from TaskTypes to task runners.
switch (type) {
case TaskType::DOMManipulation:
@@ -48,18 +48,20 @@ WebTaskRunner* TaskRunnerHelper::get(TaskType type, LocalFrame* frame) {
return nullptr;
}
-WebTaskRunner* TaskRunnerHelper::get(TaskType type, Document* document) {
+RefPtr<WebTaskRunner> TaskRunnerHelper::get(TaskType type, Document* document) {
return get(type, document ? document->frame() : nullptr);
}
-WebTaskRunner* TaskRunnerHelper::get(TaskType type,
- ExecutionContext* executionContext) {
+RefPtr<WebTaskRunner> TaskRunnerHelper::get(
+ TaskType type,
+ ExecutionContext* executionContext) {
return get(type, executionContext && executionContext->isDocument()
? static_cast<Document*>(executionContext)
: nullptr);
}
-WebTaskRunner* TaskRunnerHelper::get(TaskType type, ScriptState* scriptState) {
+RefPtr<WebTaskRunner> TaskRunnerHelper::get(TaskType type,
+ ScriptState* scriptState) {
return get(type, scriptState ? scriptState->getExecutionContext() : nullptr);
}
« no previous file with comments | « third_party/WebKit/Source/core/dom/TaskRunnerHelper.h ('k') | third_party/WebKit/Source/core/fetch/FetchContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698