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

Unified Diff: Source/core/rendering/RenderObject.h

Issue 267053002: ASSERT on renderer lifecycle (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 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/rendering/RenderMenuList.cpp ('k') | Source/core/rendering/RenderObject.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderObject.h
diff --git a/Source/core/rendering/RenderObject.h b/Source/core/rendering/RenderObject.h
index 8e2cac7534c614242f00576c406a905307e5e621..708a0ece5931ce08fa4bf52fb76a532f03a02e69 100644
--- a/Source/core/rendering/RenderObject.h
+++ b/Source/core/rendering/RenderObject.h
@@ -1102,6 +1102,8 @@ private:
#endif
const char* invalidationReasonToString(InvalidationReason) const;
+ static bool isAllowedToModifyRenderTreeStructure(Document&);
+
RefPtr<RenderStyle> m_style;
Node* m_node;
@@ -1275,6 +1277,18 @@ private:
LayoutPoint m_previousPositionFromRepaintContainer;
};
+// FIXME: remove this once the render object lifecycle ASSERTS are no longer hit.
+class DeprecatedDisableModifyRenderTreeStructureAsserts {
+ WTF_MAKE_NONCOPYABLE(DeprecatedDisableModifyRenderTreeStructureAsserts);
+public:
+ DeprecatedDisableModifyRenderTreeStructureAsserts();
+
+ static bool canModifyRenderTreeStateInAnyState();
+
+private:
+ TemporaryChange<bool> m_disabler;
+};
+
// Allow equality comparisons of RenderObject's by reference or pointer, interchangeably.
inline bool operator==(const RenderObject& a, const RenderObject& b) { return &a == &b; }
inline bool operator==(const RenderObject& a, const RenderObject* b) { return &a == b; }
« no previous file with comments | « Source/core/rendering/RenderMenuList.cpp ('k') | Source/core/rendering/RenderObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698