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

Unified Diff: third_party/WebKit/Source/platform/LifecycleContextTest.cpp

Issue 2307003002: Move collectGarbage* methods to ThreadState (Closed)
Patch Set: fix Created 4 years, 3 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/platform/LifecycleContextTest.cpp
diff --git a/third_party/WebKit/Source/platform/LifecycleContextTest.cpp b/third_party/WebKit/Source/platform/LifecycleContextTest.cpp
index 6cf49ee3c662765b98dcf0fd39878c9d87735801..84487f7f0e474fcbf20b7003f1f56a9fdff7e2f6 100644
--- a/third_party/WebKit/Source/platform/LifecycleContextTest.cpp
+++ b/third_party/WebKit/Source/platform/LifecycleContextTest.cpp
@@ -102,7 +102,7 @@ TEST(LifecycleContextTest, shouldObserveContextDestroyed)
EXPECT_FALSE(observer->contextDestroyedCalled());
context->notifyContextDestroyed();
context = nullptr;
- ThreadHeap::collectAllGarbage();
+ ThreadState::current()-> collectAllGarbage();
EXPECT_EQ(observer->lifecycleContext(), static_cast<DummyContext*>(0));
EXPECT_TRUE(observer->contextDestroyedCalled());
}
@@ -114,7 +114,7 @@ TEST(LifecycleContextTest, shouldNotObserveContextDestroyedIfUnobserve)
observer->unobserve();
context->notifyContextDestroyed();
context = nullptr;
- ThreadHeap::collectAllGarbage();
+ ThreadState::current()-> collectAllGarbage();
EXPECT_EQ(observer->lifecycleContext(), static_cast<DummyContext*>(0));
EXPECT_FALSE(observer->contextDestroyedCalled());
}
@@ -136,7 +136,7 @@ TEST(LifecycleContextTest, observerRemovedDuringNotifyDestroyed)
context->notifyContextDestroyed();
EXPECT_EQ(observer->innerObserver(), nullptr);
context = nullptr;
- ThreadHeap::collectAllGarbage();
+ ThreadState::current()-> collectAllGarbage();
EXPECT_EQ(observer->lifecycleContext(), static_cast<DummyContext*>(0));
EXPECT_TRUE(observer->contextDestroyedCalled());
}

Powered by Google App Engine
This is Rietveld 408576698