| OLD | NEW |
| 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 const BrowserControls& browserControls() const; | 70 const BrowserControls& browserControls() const; |
| 71 | 71 |
| 72 OverscrollController& overscrollController(); | 72 OverscrollController& overscrollController(); |
| 73 const OverscrollController& overscrollController() const; | 73 const OverscrollController& overscrollController() const; |
| 74 | 74 |
| 75 ConsoleMessageStorage& consoleMessageStorage(); | 75 ConsoleMessageStorage& consoleMessageStorage(); |
| 76 const ConsoleMessageStorage& consoleMessageStorage() const; | 76 const ConsoleMessageStorage& consoleMessageStorage() const; |
| 77 | 77 |
| 78 DECLARE_TRACE(); | 78 DECLARE_TRACE(); |
| 79 | 79 |
| 80 // Don't allow more than a certain number of frames in a page. | 80 void incrementSubframeCount(); |
| 81 // This seems like a reasonable upper bound, and otherwise mutually | 81 void decrementSubframeCount(); |
| 82 // recursive frameset pages can quickly bring the program to its knees | |
| 83 // with exponential growth in the number of frames. | |
| 84 static const int maxNumberOfFrames = 1000; | |
| 85 void incrementSubframeCount() { ++m_subframeCount; } | |
| 86 void decrementSubframeCount() { | |
| 87 ASSERT(m_subframeCount); | |
| 88 --m_subframeCount; | |
| 89 } | |
| 90 int subframeCount() const; | 82 int subframeCount() const; |
| 91 | 83 |
| 92 private: | 84 private: |
| 93 explicit FrameHost(Page&); | 85 explicit FrameHost(Page&); |
| 94 | 86 |
| 95 const Member<Page> m_page; | 87 const Member<Page> m_page; |
| 96 | |
| 97 int m_subframeCount; | |
| 98 }; | 88 }; |
| 99 | 89 |
| 100 } // namespace blink | 90 } // namespace blink |
| 101 | 91 |
| 102 #endif // FrameHost_h | 92 #endif // FrameHost_h |
| OLD | NEW |