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

Unified Diff: third_party/WebKit/Source/core/css/FontFaceSet.cpp

Issue 1580883002: Oilpan: move AsyncMethodRunner to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rename to RawPtrOrMemberTrait<> Created 4 years, 11 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/core/css/FontFaceSet.cpp
diff --git a/third_party/WebKit/Source/core/css/FontFaceSet.cpp b/third_party/WebKit/Source/core/css/FontFaceSet.cpp
index e8a1e1f3dffb7042a78eaa8dc3f61d0ba01e14b4..7b435591e68a841519c2bf7780fbeeffc6b40d14 100644
--- a/third_party/WebKit/Source/core/css/FontFaceSet.cpp
+++ b/third_party/WebKit/Source/core/css/FontFaceSet.cpp
@@ -118,13 +118,16 @@ FontFaceSet::FontFaceSet(Document& document)
, m_shouldFireLoadingEvent(false)
, m_isLoading(false)
, m_ready(new ReadyProperty(executionContext(), this, ReadyProperty::Ready))
- , m_asyncRunner(this, &FontFaceSet::handlePendingEventsAndPromises)
+ , m_asyncRunner(AsyncMethodRunner<FontFaceSet>::create(this, &FontFaceSet::handlePendingEventsAndPromises))
{
suspendIfNeeded();
}
FontFaceSet::~FontFaceSet()
{
+#if !ENABLE(OILPAN)
+ stop();
+#endif
}
Document* FontFaceSet::document() const
@@ -164,7 +167,7 @@ AtomicString FontFaceSet::status() const
void FontFaceSet::handlePendingEventsAndPromisesSoon()
{
// m_asyncRunner will be automatically stopped on destruction.
- m_asyncRunner.runAsync();
+ m_asyncRunner->runAsync();
}
void FontFaceSet::didLayout()
@@ -199,17 +202,17 @@ void FontFaceSet::fireLoadingEvent()
void FontFaceSet::suspend()
{
- m_asyncRunner.suspend();
+ m_asyncRunner->suspend();
}
void FontFaceSet::resume()
{
- m_asyncRunner.resume();
+ m_asyncRunner->resume();
}
void FontFaceSet::stop()
{
- m_asyncRunner.stop();
+ m_asyncRunner->stop();
}
void FontFaceSet::beginFontLoading(FontFace* fontFace)
@@ -539,6 +542,7 @@ DEFINE_TRACE(FontFaceSet)
visitor->trace(m_loadedFonts);
visitor->trace(m_failedFonts);
visitor->trace(m_nonCSSConnectedFaces);
+ visitor->trace(m_asyncRunner);
HeapSupplement<Document>::trace(visitor);
#endif
EventTargetWithInlineData::trace(visitor);
« no previous file with comments | « third_party/WebKit/Source/core/css/FontFaceSet.h ('k') | third_party/WebKit/Source/modules/gamepad/NavigatorGamepad.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698