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

Unified Diff: Source/WebCore/dom/Node.h

Issue 11196044: Merge 130266 - AX: Heap-use-after-free when deleting a ContainerNode with an AX object (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1271/
Patch Set: Created 8 years, 2 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/WebCore/dom/ContainerNode.cpp ('k') | Source/WebCore/dom/Node.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/dom/Node.h
===================================================================
--- Source/WebCore/dom/Node.h (revision 131770)
+++ Source/WebCore/dom/Node.h (working copy)
@@ -426,8 +426,8 @@
ASSERT(this);
// FIXME: below ASSERT is useful, but prevents the use of document() in the constructor or destructor
// due to the virtual function call to nodeType().
- ASSERT(m_document || (nodeType() == DOCUMENT_TYPE_NODE && !inDocument()));
- return m_document;
+ ASSERT(documentInternal() || (nodeType() == DOCUMENT_TYPE_NODE && !inDocument()));
+ return documentInternal();
}
TreeScope* treeScope() const;
@@ -749,6 +749,8 @@
void setHasCustomCallbacks() { setFlag(true, HasCustomCallbacksFlag); }
+ Document* documentInternal() const { return m_document; }
+
private:
friend class TreeShared<Node, ContainerNode>;
« no previous file with comments | « Source/WebCore/dom/ContainerNode.cpp ('k') | Source/WebCore/dom/Node.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698