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

Unified Diff: third_party/WebKit/Source/modules/fetch/DataConsumerTee.cpp

Issue 2103823002: Disallow raw pointers in CrossThreadCopier/threadSafeBind() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: bug fix. 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/modules/fetch/DataConsumerTee.cpp
diff --git a/third_party/WebKit/Source/modules/fetch/DataConsumerTee.cpp b/third_party/WebKit/Source/modules/fetch/DataConsumerTee.cpp
index a646561d6e7c65991d13fa7b62d2f9eeb0c4986e..535205629d7450a78776effa97595faadbeee306 100644
--- a/third_party/WebKit/Source/modules/fetch/DataConsumerTee.cpp
+++ b/third_party/WebKit/Source/modules/fetch/DataConsumerTee.cpp
@@ -185,7 +185,7 @@ public:
}
ASSERT(m_readerThread);
if (!m_readerThread->isCurrentThread()) {
- m_readerThread->getWebTaskRunner()->postTask(BLINK_FROM_HERE, threadSafeBind(&DestinationContext::notify, this));
+ m_readerThread->getWebTaskRunner()->postTask(BLINK_FROM_HERE, threadSafeBind(&DestinationContext::notify, wrapPassRefPtr(this)));
return;
}
}
@@ -272,7 +272,7 @@ public:
// We need to use threadSafeBind here to retain the context. Note
// |context()| return value is of type DestinationContext*, not
// PassRefPtr<DestinationContext>.
- Platform::current()->currentThread()->getWebTaskRunner()->postTask(BLINK_FROM_HERE, threadSafeBind(&DestinationContext::notify, context()));
+ Platform::current()->currentThread()->getWebTaskRunner()->postTask(BLINK_FROM_HERE, threadSafeBind(&DestinationContext::notify, wrapPassRefPtr(context())));
}
}
~DestinationReader() override

Powered by Google App Engine
This is Rietveld 408576698