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

Unified Diff: third_party/WebKit/Source/core/dom/MainThreadTaskRunnerTest.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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/loader/DocumentThreadableLoader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/MainThreadTaskRunnerTest.cpp
diff --git a/third_party/WebKit/Source/core/dom/MainThreadTaskRunnerTest.cpp b/third_party/WebKit/Source/core/dom/MainThreadTaskRunnerTest.cpp
index 1651ef4f30519affb4857a0195df50042bc5d63b..ab28688aa5c6b5f9b417f9643de542beebabf28d 100644
--- a/third_party/WebKit/Source/core/dom/MainThreadTaskRunnerTest.cpp
+++ b/third_party/WebKit/Source/core/dom/MainThreadTaskRunnerTest.cpp
@@ -48,7 +48,7 @@ TEST(MainThreadTaskRunnerTest, PostTask)
std::unique_ptr<MainThreadTaskRunner> runner = MainThreadTaskRunner::create(context);
bool isMarked = false;
- runner->postTask(BLINK_FROM_HERE, createSameThreadTask(&markBoolean, &isMarked));
+ runner->postTask(BLINK_FROM_HERE, createSameThreadTask(&markBoolean, WTF::unretained(&isMarked)));
EXPECT_FALSE(isMarked);
blink::testing::runPendingTasks();
EXPECT_TRUE(isMarked);
@@ -61,7 +61,7 @@ TEST(MainThreadTaskRunnerTest, SuspendTask)
bool isMarked = false;
context->setTasksNeedSuspension(true);
- runner->postTask(BLINK_FROM_HERE, createSameThreadTask(&markBoolean, &isMarked));
+ runner->postTask(BLINK_FROM_HERE, createSameThreadTask(&markBoolean, WTF::unretained(&isMarked)));
runner->suspend();
blink::testing::runPendingTasks();
EXPECT_FALSE(isMarked);
@@ -79,7 +79,7 @@ TEST(MainThreadTaskRunnerTest, RemoveRunner)
bool isMarked = false;
context->setTasksNeedSuspension(true);
- runner->postTask(BLINK_FROM_HERE, createSameThreadTask(&markBoolean, &isMarked));
+ runner->postTask(BLINK_FROM_HERE, createSameThreadTask(&markBoolean, WTF::unretained(&isMarked)));
runner = nullptr;
blink::testing::runPendingTasks();
EXPECT_FALSE(isMarked);
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/loader/DocumentThreadableLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698