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

Unified Diff: Source/core/page/Page.cpp

Issue 235113002: Oilpan: Remove guardRef and guardDeref from TreeScope. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address comments. Created 6 years, 8 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 | « Source/core/page/Page.h ('k') | Source/core/speech/SpeechInput.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/Page.cpp
diff --git a/Source/core/page/Page.cpp b/Source/core/page/Page.cpp
index 800c4df63e33508f716888d8774f8044b80fbf67..e5a377a61a3a5087fcaaecd1822d145df4043ab2 100644
--- a/Source/core/page/Page.cpp
+++ b/Source/core/page/Page.cpp
@@ -53,6 +53,7 @@
#include "core/rendering/FastTextAutosizer.h"
#include "core/rendering/RenderView.h"
#include "core/rendering/TextAutosizer.h"
+#include "core/speech/SpeechInput.h"
#include "core/storage/StorageNamespace.h"
#include "platform/plugins/PluginData.h"
#include "wtf/HashMap.h"
@@ -470,8 +471,8 @@ void Page::settingsChanged(SettingsDelegate::ChangeType changeType)
frame->document()->initDNSPrefetch();
break;
case SettingsDelegate::MultisamplingChange: {
- HashSet<MultisamplingChangedObserver*>::iterator stop = m_multisamplingChangedObservers.end();
- for (HashSet<MultisamplingChangedObserver*>::iterator it = m_multisamplingChangedObservers.begin(); it != stop; ++it)
+ WillBeHeapHashSet<RawPtrWillBeWeakMember<MultisamplingChangedObserver> >::iterator stop = m_multisamplingChangedObservers.end();
+ for (WillBeHeapHashSet<RawPtrWillBeWeakMember<MultisamplingChangedObserver> >::iterator it = m_multisamplingChangedObservers.begin(); it != stop; ++it)
(*it)->multisamplingChanged(m_settings->openGLMultisamplingEnabled());
break;
}
@@ -539,9 +540,18 @@ PassOwnPtr<LifecycleNotifier<Page> > Page::createLifecycleNotifier()
void Page::trace(Visitor* visitor)
{
+ visitor->registerWeakMembers<Page, &Page::clearWeakMembers>(this);
+ visitor->trace(m_multisamplingChangedObservers);
Supplementable<Page>::trace(visitor);
}
+void Page::clearWeakMembers(Visitor* visitor)
+{
+ SpeechInput* input = SpeechInput::from(this);
+ if (input)
+ input->clearWeakMembers(visitor);
+}
+
void Page::willBeDestroyed()
{
// Disable all agents prior to resetting the frame view.
« no previous file with comments | « Source/core/page/Page.h ('k') | Source/core/speech/SpeechInput.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698