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

Unified Diff: Source/web/tests/TouchActionTest.cpp

Issue 280123002: Oilpan: move LiveNodeList collections to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase needed Created 6 years, 7 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: Source/web/tests/TouchActionTest.cpp
diff --git a/Source/web/tests/TouchActionTest.cpp b/Source/web/tests/TouchActionTest.cpp
index f5d1c4f26d8f82dd13076aaf73805219b925f6ac..9545d167c99bbeaddf9339f848dad43cf00d7ec6 100644
--- a/Source/web/tests/TouchActionTest.cpp
+++ b/Source/web/tests/TouchActionTest.cpp
@@ -147,7 +147,7 @@ void TouchActionTest::runShadowDOMTest(std::string file)
WebCore::TrackExceptionState es;
RefPtrWillBeRawPtr<WebCore::Document> document = static_cast<PassRefPtrWillBeRawPtr<WebCore::Document> >(webView->mainFrame()->document());
- RefPtr<WebCore::NodeList> hostNodes = document->querySelectorAll("[shadow-host]", es);
+ RefPtrWillBeRawPtr<WebCore::NodeList> hostNodes = document->querySelectorAll("[shadow-host]", es);
ASSERT_FALSE(es.hadException());
ASSERT_GE(hostNodes->length(), 1u);
@@ -186,10 +186,16 @@ void TouchActionTest::runTestOnTree(WebCore::ContainerNode* root, WebView* webVi
{
// Find all elements to test the touch-action of in the document.
WebCore::TrackExceptionState es;
- RefPtr<WebCore::NodeList> nodes = root->querySelectorAll("[expected-action]", es);
+ RefPtrWillBeRawPtr<WebCore::NodeList> nodes = root->querySelectorAll("[expected-action]", es);
ASSERT_FALSE(es.hadException());
for (unsigned index = 0; index < nodes->length(); index++) {
+ // FIXME: Oilpan: this is a longer running test that allocates. If the
+ // PendingGCRunner task is run, it GCs assuming no pointers on the stack.
+ // But there are here; explicitly GCing each time around this loop isn't
+ // addressing that problem completely.
+ WebCore::Heap::collectGarbage(WebCore::ThreadState::HeapPointersOnStack);
+
WebCore::Element* element = toElement(nodes->item(index));
element->scrollIntoViewIfNeeded();
ASSERT_TRUE(nodes->item(index)->isElementNode());

Powered by Google App Engine
This is Rietveld 408576698