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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/ScriptPromiseResolverTest.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
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/bindings/core/v8/ScriptPromiseResolverTest.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/ScriptPromiseResolverTest.cpp b/third_party/WebKit/Source/bindings/core/v8/ScriptPromiseResolverTest.cpp
index 052d4158a64211714fc70b4bf5bd735b74adae38..0168a916955a2be50bbaf4386f6c1a393d5c11ba 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ScriptPromiseResolverTest.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/ScriptPromiseResolverTest.cpp
@@ -232,11 +232,11 @@ TEST_F(ScriptPromiseResolverTest, keepAliveUntilResolved)
resolver = ScriptPromiseResolverKeepAlive::create(getScriptState());
}
resolver->keepAliveWhilePending();
- ThreadHeap::collectGarbage(BlinkGC::NoHeapPointersOnStack, BlinkGC::GCWithSweep, BlinkGC::ForcedGC);
+ ThreadState::current()->collectGarbage(BlinkGC::NoHeapPointersOnStack, BlinkGC::GCWithSweep, BlinkGC::ForcedGC);
ASSERT_TRUE(ScriptPromiseResolverKeepAlive::isAlive());
resolver->resolve("hello");
- ThreadHeap::collectGarbage(BlinkGC::NoHeapPointersOnStack, BlinkGC::GCWithSweep, BlinkGC::ForcedGC);
+ ThreadState::current()->collectGarbage(BlinkGC::NoHeapPointersOnStack, BlinkGC::GCWithSweep, BlinkGC::ForcedGC);
EXPECT_FALSE(ScriptPromiseResolverKeepAlive::isAlive());
}
@@ -249,11 +249,11 @@ TEST_F(ScriptPromiseResolverTest, keepAliveUntilRejected)
resolver = ScriptPromiseResolverKeepAlive::create(getScriptState());
}
resolver->keepAliveWhilePending();
- ThreadHeap::collectGarbage(BlinkGC::NoHeapPointersOnStack, BlinkGC::GCWithSweep, BlinkGC::ForcedGC);
+ ThreadState::current()->collectGarbage(BlinkGC::NoHeapPointersOnStack, BlinkGC::GCWithSweep, BlinkGC::ForcedGC);
ASSERT_TRUE(ScriptPromiseResolverKeepAlive::isAlive());
resolver->reject("hello");
- ThreadHeap::collectGarbage(BlinkGC::NoHeapPointersOnStack, BlinkGC::GCWithSweep, BlinkGC::ForcedGC);
+ ThreadState::current()->collectGarbage(BlinkGC::NoHeapPointersOnStack, BlinkGC::GCWithSweep, BlinkGC::ForcedGC);
EXPECT_FALSE(ScriptPromiseResolverKeepAlive::isAlive());
}
@@ -266,11 +266,11 @@ TEST_F(ScriptPromiseResolverTest, keepAliveUntilStopped)
resolver = ScriptPromiseResolverKeepAlive::create(getScriptState());
}
resolver->keepAliveWhilePending();
- ThreadHeap::collectGarbage(BlinkGC::NoHeapPointersOnStack, BlinkGC::GCWithSweep, BlinkGC::ForcedGC);
+ ThreadState::current()->collectGarbage(BlinkGC::NoHeapPointersOnStack, BlinkGC::GCWithSweep, BlinkGC::ForcedGC);
EXPECT_TRUE(ScriptPromiseResolverKeepAlive::isAlive());
getExecutionContext()->stopActiveDOMObjects();
- ThreadHeap::collectGarbage(BlinkGC::NoHeapPointersOnStack, BlinkGC::GCWithSweep, BlinkGC::ForcedGC);
+ ThreadState::current()->collectGarbage(BlinkGC::NoHeapPointersOnStack, BlinkGC::GCWithSweep, BlinkGC::ForcedGC);
EXPECT_FALSE(ScriptPromiseResolverKeepAlive::isAlive());
}
@@ -283,16 +283,16 @@ TEST_F(ScriptPromiseResolverTest, suspend)
resolver = ScriptPromiseResolverKeepAlive::create(getScriptState());
}
resolver->keepAliveWhilePending();
- ThreadHeap::collectGarbage(BlinkGC::NoHeapPointersOnStack, BlinkGC::GCWithSweep, BlinkGC::ForcedGC);
+ ThreadState::current()->collectGarbage(BlinkGC::NoHeapPointersOnStack, BlinkGC::GCWithSweep, BlinkGC::ForcedGC);
ASSERT_TRUE(ScriptPromiseResolverKeepAlive::isAlive());
getExecutionContext()->suspendActiveDOMObjects();
resolver->resolve("hello");
- ThreadHeap::collectGarbage(BlinkGC::NoHeapPointersOnStack, BlinkGC::GCWithSweep, BlinkGC::ForcedGC);
+ ThreadState::current()->collectGarbage(BlinkGC::NoHeapPointersOnStack, BlinkGC::GCWithSweep, BlinkGC::ForcedGC);
EXPECT_TRUE(ScriptPromiseResolverKeepAlive::isAlive());
getExecutionContext()->stopActiveDOMObjects();
- ThreadHeap::collectGarbage(BlinkGC::NoHeapPointersOnStack, BlinkGC::GCWithSweep, BlinkGC::ForcedGC);
+ ThreadState::current()->collectGarbage(BlinkGC::NoHeapPointersOnStack, BlinkGC::GCWithSweep, BlinkGC::ForcedGC);
EXPECT_FALSE(ScriptPromiseResolverKeepAlive::isAlive());
}
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698