| Index: Source/core/page/Page.h
|
| diff --git a/Source/core/page/Page.h b/Source/core/page/Page.h
|
| index 9da896b3381744e891752622dcc107efe3470d08..c0bf5bfe39e49f0ed6242e56dd4639fb18a395a5 100644
|
| --- a/Source/core/page/Page.h
|
| +++ b/Source/core/page/Page.h
|
| @@ -134,6 +134,10 @@
|
| bool openedByDOM() const;
|
| void setOpenedByDOM();
|
|
|
| + void incrementSubframeCount() { ++m_subframeCount; }
|
| + void decrementSubframeCount() { ASSERT(m_subframeCount); --m_subframeCount; }
|
| + int subframeCount() const { checkSubframeCountConsistency(); return m_subframeCount; }
|
| +
|
| PageAnimator& animator() { return m_animator; }
|
| Chrome& chrome() const { return *m_chrome; }
|
| AutoscrollController& autoscrollController() const { return *m_autoscrollController; }
|
| @@ -181,6 +185,12 @@
|
| StorageNamespace* sessionStorage(bool optionalCreate = true);
|
| StorageClient& storageClient() const { return *m_storageClient; }
|
|
|
| + // Don't allow more than a certain number of frames in a page.
|
| + // This seems like a reasonable upper bound, and otherwise mutually
|
| + // recursive frameset pages can quickly bring the program to its knees
|
| + // with exponential growth in the number of frames.
|
| + static const int maxNumberOfFrames = 1000;
|
| +
|
| PageVisibilityState visibilityState() const;
|
| void setVisibilityState(PageVisibilityState, bool);
|
|
|
| @@ -217,6 +227,12 @@
|
|
|
| private:
|
| void initGroup();
|
| +
|
| +#if ENABLE(ASSERT)
|
| + void checkSubframeCountConsistency() const;
|
| +#else
|
| + void checkSubframeCountConsistency() const { }
|
| +#endif
|
|
|
| void setTimerAlignmentInterval(double);
|
|
|
| @@ -261,6 +277,7 @@
|
|
|
| UseCounter m_useCounter;
|
|
|
| + int m_subframeCount;
|
| bool m_openedByDOM;
|
|
|
| bool m_tabKeyCyclesThroughElements;
|
|
|