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

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

Issue 2093603002: Wrap non-GCed raw pointer parameters of WTF::bind with WTF::unretained (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@unretained_wrapper
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/modules/fetch/DataConsumerHandleTestUtil.cpp
diff --git a/third_party/WebKit/Source/modules/fetch/DataConsumerHandleTestUtil.cpp b/third_party/WebKit/Source/modules/fetch/DataConsumerHandleTestUtil.cpp
index aec0a1e816fc5c2ec21606301a5bff89b4dc88cd..f5834c2923b54b9be9c4a86bb86f7c49de0a6475 100644
--- a/third_party/WebKit/Source/modules/fetch/DataConsumerHandleTestUtil.cpp
+++ b/third_party/WebKit/Source/modules/fetch/DataConsumerHandleTestUtil.cpp
@@ -252,7 +252,7 @@ void DataConsumerHandleTestUtil::HandleReader::didGetReadable()
}
std::unique_ptr<HandleReadResult> result = wrapUnique(new HandleReadResult(r, m_data));
m_data.clear();
- Platform::current()->currentThread()->getWebTaskRunner()->postTask(BLINK_FROM_HERE, WTF::bind(&HandleReader::runOnFinishedReading, this, passed(std::move(result))));
+ Platform::current()->currentThread()->getWebTaskRunner()->postTask(BLINK_FROM_HERE, WTF::bind(&HandleReader::runOnFinishedReading, WTF::unretained(this), passed(std::move(result))));
m_reader = nullptr;
}
@@ -287,7 +287,7 @@ void DataConsumerHandleTestUtil::HandleTwoPhaseReader::didGetReadable()
}
std::unique_ptr<HandleReadResult> result = wrapUnique(new HandleReadResult(r, m_data));
m_data.clear();
- Platform::current()->currentThread()->getWebTaskRunner()->postTask(BLINK_FROM_HERE, WTF::bind(&HandleTwoPhaseReader::runOnFinishedReading, this, passed(std::move(result))));
+ Platform::current()->currentThread()->getWebTaskRunner()->postTask(BLINK_FROM_HERE, WTF::bind(&HandleTwoPhaseReader::runOnFinishedReading, WTF::unretained(this), passed(std::move(result))));
m_reader = nullptr;
}

Powered by Google App Engine
This is Rietveld 408576698