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

Side by Side Diff: Source/core/dom/Document.h

Issue 1252683003: Oilpan: Schedule a precise GC when a page navigates (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/core/dom/Document.cpp » ('j') | Source/platform/heap/ThreadState.cpp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r ights reserved.
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
8 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 8 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
9 * Copyright (C) 2011 Google Inc. All rights reserved. 9 * Copyright (C) 2011 Google Inc. All rights reserved.
10 * 10 *
(...skipping 1020 matching lines...) Expand 10 before | Expand all | Expand 10 after
1031 1031
1032 NthIndexCache* nthIndexCache() const { return m_nthIndexCache; } 1032 NthIndexCache* nthIndexCache() const { return m_nthIndexCache; }
1033 1033
1034 bool isPrivilegedContext(String& errorMessage, const PrivilegeContextCheck = StandardPrivilegeCheck) const override; 1034 bool isPrivilegedContext(String& errorMessage, const PrivilegeContextCheck = StandardPrivilegeCheck) const override;
1035 1035
1036 void setClientHintsPreferences(const ClientHintsPreferences& preferences) { m_clientHintsPreferences.set(preferences); } 1036 void setClientHintsPreferences(const ClientHintsPreferences& preferences) { m_clientHintsPreferences.set(preferences); }
1037 const ClientHintsPreferences& clientHintsPreferences() const { return m_clie ntHintsPreferences; } 1037 const ClientHintsPreferences& clientHintsPreferences() const { return m_clie ntHintsPreferences; }
1038 1038
1039 CanvasFontCache* canvasFontCache(); 1039 CanvasFontCache* canvasFontCache();
1040 1040
1041 void incrementNodeCount() { m_nodeCount++; }
1042 void decrementNodeCount()
1043 {
1044 ASSERT(m_nodeCount > 0);
1045 m_nodeCount--;
1046 }
1047 int nodeCount() { return m_nodeCount; }
haraken 2015/08/06 07:52:42 Add const.
keishi 2015/08/11 06:59:53 Done.
1048
1049 using WeakDocumentSet = WillBeHeapHashSet<RawPtrWillBeWeakMember<Document>>;
1050 static WeakDocumentSet& liveDocumentSet();
1051
1041 protected: 1052 protected:
1042 Document(const DocumentInit&, DocumentClassFlags = DefaultDocumentClass); 1053 Document(const DocumentInit&, DocumentClassFlags = DefaultDocumentClass);
1043 1054
1044 void didUpdateSecurityOrigin() final; 1055 void didUpdateSecurityOrigin() final;
1045 1056
1046 void clearXMLVersion() { m_xmlVersion = String(); } 1057 void clearXMLVersion() { m_xmlVersion = String(); }
1047 1058
1048 #if !ENABLE(OILPAN) 1059 #if !ENABLE(OILPAN)
1049 void dispose() override; 1060 void dispose() override;
1050 #endif 1061 #endif
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
1377 1388
1378 int m_styleRecalcElementCounter; 1389 int m_styleRecalcElementCounter;
1379 1390
1380 ParserSynchronizationPolicy m_parserSyncPolicy; 1391 ParserSynchronizationPolicy m_parserSyncPolicy;
1381 1392
1382 OriginsUsingFeatures::Value m_originsUsingFeaturesValue; 1393 OriginsUsingFeatures::Value m_originsUsingFeaturesValue;
1383 1394
1384 ClientHintsPreferences m_clientHintsPreferences; 1395 ClientHintsPreferences m_clientHintsPreferences;
1385 1396
1386 PersistentWillBeMember<CanvasFontCache> m_canvasFontCache; 1397 PersistentWillBeMember<CanvasFontCache> m_canvasFontCache;
1398
1399 int m_nodeCount;
1387 }; 1400 };
1388 1401
1389 extern template class CORE_EXTERN_TEMPLATE_EXPORT WillBeHeapSupplement<Document> ; 1402 extern template class CORE_EXTERN_TEMPLATE_EXPORT WillBeHeapSupplement<Document> ;
1390 1403
1391 inline bool Document::shouldOverrideLegacyDescription(ViewportDescription::Type origin) 1404 inline bool Document::shouldOverrideLegacyDescription(ViewportDescription::Type origin)
1392 { 1405 {
1393 // The different (legacy) meta tags have different priorities based on the t ype 1406 // The different (legacy) meta tags have different priorities based on the t ype
1394 // regardless of which order they appear in the DOM. The priority is given b y the 1407 // regardless of which order they appear in the DOM. The priority is given b y the
1395 // ViewportDescription::Type enum. 1408 // ViewportDescription::Type enum.
1396 return origin >= m_legacyViewportDescription.type; 1409 return origin >= m_legacyViewportDescription.type;
(...skipping 29 matching lines...) Expand all
1426 DEFINE_TYPE_CASTS(TreeScope, Document, document, true, true); 1439 DEFINE_TYPE_CASTS(TreeScope, Document, document, true, true);
1427 1440
1428 } // namespace blink 1441 } // namespace blink
1429 1442
1430 #ifndef NDEBUG 1443 #ifndef NDEBUG
1431 // Outside the WebCore namespace for ease of invocation from gdb. 1444 // Outside the WebCore namespace for ease of invocation from gdb.
1432 CORE_EXPORT void showLiveDocumentInstances(); 1445 CORE_EXPORT void showLiveDocumentInstances();
1433 #endif 1446 #endif
1434 1447
1435 #endif // Document_h 1448 #endif // Document_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/dom/Document.cpp » ('j') | Source/platform/heap/ThreadState.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698