Title: [209870] trunk/Source/WebCore
- Revision
- 209870
- Author
- [email protected]
- Date
- 2016-12-15 13:08:40 -0800 (Thu, 15 Dec 2016)
Log Message
Inline Document::existingAXObjectCache()
https://bugs.webkit.org/show_bug.cgi?id=165906
Reviewed by Darin Adler.
Inline Document::existingAXObjectCache() to avoid paying function call
cost in the common case where AX is disabled.
* dom/Document.cpp:
(WebCore::Document::existingAXObjectCacheSlow):
(WebCore::Document::existingAXObjectCache): Deleted.
* dom/Document.h:
(WebCore::Document::existingAXObjectCache):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (209869 => 209870)
--- trunk/Source/WebCore/ChangeLog 2016-12-15 20:55:18 UTC (rev 209869)
+++ trunk/Source/WebCore/ChangeLog 2016-12-15 21:08:40 UTC (rev 209870)
@@ -1,3 +1,19 @@
+2016-12-15 Chris Dumez <[email protected]>
+
+ Inline Document::existingAXObjectCache()
+ https://bugs.webkit.org/show_bug.cgi?id=165906
+
+ Reviewed by Darin Adler.
+
+ Inline Document::existingAXObjectCache() to avoid paying function call
+ cost in the common case where AX is disabled.
+
+ * dom/Document.cpp:
+ (WebCore::Document::existingAXObjectCacheSlow):
+ (WebCore::Document::existingAXObjectCache): Deleted.
+ * dom/Document.h:
+ (WebCore::Document::existingAXObjectCache):
+
2016-12-15 Ryan Haddad <[email protected]>
Rebaseline bindings tests after r209864.
Modified: trunk/Source/WebCore/dom/Document.cpp (209869 => 209870)
--- trunk/Source/WebCore/dom/Document.cpp 2016-12-15 20:55:18 UTC (rev 209869)
+++ trunk/Source/WebCore/dom/Document.cpp 2016-12-15 21:08:40 UTC (rev 209870)
@@ -275,6 +275,7 @@
using namespace HTMLNames;
static const unsigned cMaxWriteRecursionDepth = 21;
+bool Document::hasEverCreatedAnAXObjectCache = false;
// DOM Level 2 says (letters added):
//
@@ -2416,13 +2417,9 @@
m_axObjectCache = nullptr;
}
-static bool hasEverCreatedAnAXObjectCache = false;
-
-AXObjectCache* Document::existingAXObjectCache() const
+AXObjectCache* Document::existingAXObjectCacheSlow() const
{
- if (!hasEverCreatedAnAXObjectCache)
- return nullptr;
-
+ ASSERT(hasEverCreatedAnAXObjectCache);
Document& topDocument = this->topDocument();
if (!topDocument.hasLivingRenderTree())
return nullptr;
Modified: trunk/Source/WebCore/dom/Document.h (209869 => 209870)
--- trunk/Source/WebCore/dom/Document.h 2016-12-15 20:55:18 UTC (rev 209869)
+++ trunk/Source/WebCore/dom/Document.h 2016-12-15 21:08:40 UTC (rev 209870)
@@ -1381,6 +1381,7 @@
void wheelEventHandlersChanged();
HttpEquivPolicy httpEquivPolicy() const;
+ AXObjectCache* existingAXObjectCacheSlow() const;
// DOM Cookies caching.
const String& cachedDOMCookies() const { return m_cachedDOMCookies; }
@@ -1764,6 +1765,8 @@
#if ENABLE(WEB_SOCKETS)
RefPtr<SocketProvider> m_socketProvider;
#endif
+
+ static bool hasEverCreatedAnAXObjectCache;
};
inline void Document::notifyRemovePendingSheetIfNeeded()
@@ -1784,6 +1787,13 @@
return m_templateDocumentHost ? this : m_templateDocument.get();
}
+inline AXObjectCache* Document::existingAXObjectCache() const
+{
+ if (!hasEverCreatedAnAXObjectCache)
+ return nullptr;
+ return existingAXObjectCacheSlow();
+}
+
// Put these methods here, because they require the Document definition, but we really want to inline them.
inline bool Node::isDocumentNode() const
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes