| Index: Source/core/frame/FrameHost.h
|
| diff --git a/Source/core/frame/FrameHost.h b/Source/core/frame/FrameHost.h
|
| index 37dccda148597cfef4abfaba53e356e1e805a49f..aa94c51cd9f1c1262df56890b7c9cfe1dfaf1d52 100644
|
| --- a/Source/core/frame/FrameHost.h
|
| +++ b/Source/core/frame/FrameHost.h
|
| @@ -82,6 +82,15 @@ public:
|
|
|
| void trace(Visitor*);
|
|
|
| + // 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;
|
| + void incrementSubframeCount() { ++m_subframeCount; }
|
| + void decrementSubframeCount() { ASSERT(m_subframeCount); --m_subframeCount; }
|
| + int subframeCount() const;
|
| +
|
| private:
|
| explicit FrameHost(Page&);
|
|
|
| @@ -90,6 +99,7 @@ private:
|
| const OwnPtrWillBeMember<EventHandlerRegistry> m_eventHandlerRegistry;
|
|
|
| AtomicString m_overrideEncoding;
|
| + int m_subframeCount;
|
| };
|
|
|
| }
|
|
|