| Index: Source/core/frame/FrameHost.h
|
| diff --git a/Source/core/frame/FrameHost.h b/Source/core/frame/FrameHost.h
|
| index d463eb048ed08a64683161b2640f8e757f3bd587..7a300784ab40ff0cdc8ef4e66e6b7c8db78c4ad3 100644
|
| --- a/Source/core/frame/FrameHost.h
|
| +++ b/Source/core/frame/FrameHost.h
|
| @@ -79,12 +79,22 @@ 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 incrementFrameCount() { ++m_frameCount; }
|
| + void decrementFrameCount() { ASSERT(m_frameCount); --m_frameCount; }
|
| + int frameCount() const;
|
| +
|
| private:
|
| explicit FrameHost(Page&);
|
|
|
| RawPtrWillBeMember<Page> m_page;
|
| const OwnPtr<PinchViewport> m_pinchViewport;
|
| const OwnPtrWillBeMember<EventHandlerRegistry> m_eventHandlerRegistry;
|
| + int m_frameCount;
|
| };
|
|
|
| }
|
|
|