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

Side by Side Diff: third_party/WebKit/Source/core/frame/FrameHost.h

Issue 2739033003: Move FrameHost::m_subframeCount to Page (Closed)
Patch Set: Rebase Created 3 years, 9 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 VisualViewport& visualViewport(); 77 VisualViewport& visualViewport();
78 const VisualViewport& visualViewport() const; 78 const VisualViewport& visualViewport() const;
79 79
80 ConsoleMessageStorage& consoleMessageStorage(); 80 ConsoleMessageStorage& consoleMessageStorage();
81 const ConsoleMessageStorage& consoleMessageStorage() const; 81 const ConsoleMessageStorage& consoleMessageStorage() const;
82 82
83 TopDocumentRootScrollerController& globalRootScrollerController() const; 83 TopDocumentRootScrollerController& globalRootScrollerController() const;
84 84
85 DECLARE_TRACE(); 85 DECLARE_TRACE();
86 86
87 // Don't allow more than a certain number of frames in a page. 87 void incrementSubframeCount();
88 // This seems like a reasonable upper bound, and otherwise mutually 88 void decrementSubframeCount();
89 // recursive frameset pages can quickly bring the program to its knees
90 // with exponential growth in the number of frames.
91 static const int maxNumberOfFrames = 1000;
92 void incrementSubframeCount() { ++m_subframeCount; }
93 void decrementSubframeCount() {
94 ASSERT(m_subframeCount);
95 --m_subframeCount;
96 }
97 int subframeCount() const; 89 int subframeCount() const;
98 90
99 private: 91 private:
100 explicit FrameHost(Page&); 92 explicit FrameHost(Page&);
101 93
102 const Member<Page> m_page; 94 const Member<Page> m_page;
103 const Member<VisualViewport> m_visualViewport; 95 const Member<VisualViewport> m_visualViewport;
104 const Member<OverscrollController> m_overscrollController; 96 const Member<OverscrollController> m_overscrollController;
105 const Member<ConsoleMessageStorage> m_consoleMessageStorage; 97 const Member<ConsoleMessageStorage> m_consoleMessageStorage;
106 const Member<TopDocumentRootScrollerController> 98 const Member<TopDocumentRootScrollerController>
107 m_globalRootScrollerController; 99 m_globalRootScrollerController;
108
109 int m_subframeCount;
110 }; 100 };
111 101
112 } // namespace blink 102 } // namespace blink
113 103
114 #endif // FrameHost_h 104 #endif // FrameHost_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/NodeRareData.cpp ('k') | third_party/WebKit/Source/core/frame/FrameHost.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698