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

Unified Diff: Source/core/dom/NodeRareData.cpp

Issue 1233453006: Merge 197139 "Fix the logic that limits the number of frames in ..." (Closed) Base URL: svn://svn.chromium.org/blink/branches/chromium/2403/
Patch Set: Created 5 years, 5 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/dom/NodeRareData.h ('k') | Source/core/frame/LocalFrame.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/NodeRareData.cpp
===================================================================
--- Source/core/dom/NodeRareData.cpp (revision 198700)
+++ Source/core/dom/NodeRareData.cpp (working copy)
@@ -73,6 +73,12 @@
this->~NodeRareData();
}
+void NodeRareData::incrementConnectedSubframeCount(unsigned amount)
+{
+ RELEASE_ASSERT_WITH_SECURITY_IMPLICATION((m_connectedFrameCount + amount) <= FrameHost::maxNumberOfFrames);
+ m_connectedFrameCount += amount;
+}
+
// Ensure the 10 bits reserved for the m_connectedFrameCount cannot overflow
static_assert(FrameHost::maxNumberOfFrames < (1 << NodeRareData::ConnectedFrameCountBits), "Frame limit should fit in rare data count");
« no previous file with comments | « Source/core/dom/NodeRareData.h ('k') | Source/core/frame/LocalFrame.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698