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

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

Issue 2049003002: Wrap GCed raw pointer parameters of WTF::bind with Persistent (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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
Index: third_party/WebKit/Source/core/dom/ExecutionContext.cpp
diff --git a/third_party/WebKit/Source/core/dom/ExecutionContext.cpp b/third_party/WebKit/Source/core/dom/ExecutionContext.cpp
index 4a49825c094cff40829c9387b9d6ce4a44e15f07..6cd1f1172f45776b24102b9d53ecc4a7603ced27 100644
--- a/third_party/WebKit/Source/core/dom/ExecutionContext.cpp
+++ b/third_party/WebKit/Source/core/dom/ExecutionContext.cpp
@@ -94,7 +94,7 @@ void ExecutionContext::postSuspendableTask(std::unique_ptr<SuspendableTask> task
{
m_suspendedTasks.append(std::move(task));
if (!m_activeDOMObjectsAreSuspended)
- postTask(BLINK_FROM_HERE, createSameThreadTask(&ExecutionContext::runSuspendableTasks, this));
+ postTask(BLINK_FROM_HERE, createSameThreadTask(&ExecutionContext::runSuspendableTasks, wrapPersistent(this)));
}
void ExecutionContext::notifyContextDestroyed()
@@ -120,7 +120,7 @@ void ExecutionContext::resumeScheduledTasks()
if (m_isRunSuspendableTasksScheduled)
return;
m_isRunSuspendableTasksScheduled = true;
- postTask(BLINK_FROM_HERE, createSameThreadTask(&ExecutionContext::runSuspendableTasks, this));
+ postTask(BLINK_FROM_HERE, createSameThreadTask(&ExecutionContext::runSuspendableTasks, wrapPersistent(this)));
}
void ExecutionContext::suspendActiveDOMObjectIfNeeded(ActiveDOMObject* object)

Powered by Google App Engine
This is Rietveld 408576698