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

Unified Diff: Source/core/dom/FullscreenElementStack.cpp

Issue 262093006: Oilpan: Make the Node hierarchy RefCountedGarbageCollected instead of TreeShared. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Another build fix. 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/core/dom/FullscreenElementStack.cpp
diff --git a/Source/core/dom/FullscreenElementStack.cpp b/Source/core/dom/FullscreenElementStack.cpp
index 98d846eaac8b96fc4ed80d7b9b2a8efc7f27a9eb..9d82cad6eb91504daf0245ad1f23dc5888dbd323 100644
--- a/Source/core/dom/FullscreenElementStack.cpp
+++ b/Source/core/dom/FullscreenElementStack.cpp
@@ -268,7 +268,7 @@ void FullscreenElementStack::webkitCancelFullScreen()
// To achieve that aim, remove all the elements from the top document's stack except for the first before
// calling webkitExitFullscreen():
- Vector<RefPtr<Element> > replacementFullscreenElementStack;
+ WillBeHeapVector<RefPtrWillBeMember<Element> > replacementFullscreenElementStack;
replacementFullscreenElementStack.append(fullscreenElementFrom(document()->topDocument()));
FullscreenElementStack& topFullscreenElementStack = from(document()->topDocument());
topFullscreenElementStack.m_fullScreenElementStack.swap(replacementFullscreenElementStack);
@@ -477,14 +477,14 @@ void FullscreenElementStack::fullScreenChangeDelayTimerFired(Timer<FullscreenEle
// Since we dispatch events in this function, it's possible that the
// document will be detached and GC'd. We protect it here to make sure we
// can finish the function successfully.
- RefPtr<Document> protectDocument(document());
- Deque<RefPtr<Node> > changeQueue;
+ RefPtrWillBeRawPtr<Document> protectDocument(document());
+ WillBeHeapDeque<RefPtrWillBeMember<Node> > changeQueue;
m_fullScreenChangeEventTargetQueue.swap(changeQueue);
- Deque<RefPtr<Node> > errorQueue;
+ WillBeHeapDeque<RefPtrWillBeMember<Node> > errorQueue;
m_fullScreenErrorEventTargetQueue.swap(errorQueue);
while (!changeQueue.isEmpty()) {
- RefPtr<Node> node = changeQueue.takeFirst();
+ RefPtrWillBeRawPtr<Node> node = changeQueue.takeFirst();
if (!node)
node = document()->documentElement();
// The dispatchEvent below may have blown away our documentElement.
@@ -500,7 +500,7 @@ void FullscreenElementStack::fullScreenChangeDelayTimerFired(Timer<FullscreenEle
}
while (!errorQueue.isEmpty()) {
- RefPtr<Node> node = errorQueue.takeFirst();
+ RefPtrWillBeRawPtr<Node> node = errorQueue.takeFirst();
if (!node)
node = document()->documentElement();
// The dispatchEvent below may have blown away our documentElement.
@@ -575,4 +575,12 @@ void FullscreenElementStack::addDocumentToFullScreenChangeEventQueue(Document* d
m_fullScreenChangeEventTargetQueue.append(target);
}
+void FullscreenElementStack::trace(Visitor* visitor)
+{
+ visitor->trace(m_fullScreenElement);
+ visitor->trace(m_fullScreenElementStack);
+ visitor->trace(m_fullScreenChangeEventTargetQueue);
+ visitor->trace(m_fullScreenErrorEventTargetQueue);
+}
+
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698