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

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: revert "unretained" part and "disallow pointers" part 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 e061090ddd543b662b1460c7c68312f3eae47b71..e2ea6611627cf8fda477a165dd816a944756a363 100644
--- a/third_party/WebKit/Source/core/dom/ExecutionContext.cpp
+++ b/third_party/WebKit/Source/core/dom/ExecutionContext.cpp
@@ -92,7 +92,7 @@ void ExecutionContext::postSuspendableTask(PassOwnPtr<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, wrapCrossThreadPersistent(this)));
}
void ExecutionContext::notifyContextDestroyed()
@@ -118,7 +118,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, wrapCrossThreadPersistent(this)));
}
void ExecutionContext::suspendActiveDOMObjectIfNeeded(ActiveDOMObject* object)

Powered by Google App Engine
This is Rietveld 408576698