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

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

Issue 551973005: Streamline frame detach (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/frame/FrameClient.h ('k') | Source/core/frame/FrameHost.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 float deviceScaleFactor() const; 75 float deviceScaleFactor() const;
76 76
77 PinchViewport& pinchViewport() const; 77 PinchViewport& pinchViewport() const;
78 EventHandlerRegistry& eventHandlerRegistry() const; 78 EventHandlerRegistry& eventHandlerRegistry() const;
79 79
80 const AtomicString& overrideEncoding() const { return m_overrideEncoding; } 80 const AtomicString& overrideEncoding() const { return m_overrideEncoding; }
81 void setOverrideEncoding(const AtomicString& encoding) { m_overrideEncoding = encoding; } 81 void setOverrideEncoding(const AtomicString& encoding) { m_overrideEncoding = encoding; }
82 82
83 void trace(Visitor*); 83 void trace(Visitor*);
84 84
85 // Don't allow more than a certain number of frames in a page.
86 // This seems like a reasonable upper bound, and otherwise mutually
87 // recursive frameset pages can quickly bring the program to its knees
88 // with exponential growth in the number of frames.
89 static const int maxNumberOfFrames = 1000;
90 void incrementFrameCount() { ++m_frameCount; }
91 void decrementFrameCount() { ASSERT(m_frameCount); --m_frameCount; }
92 int frameCount() const;
93
85 private: 94 private:
86 explicit FrameHost(Page&); 95 explicit FrameHost(Page&);
87 96
88 RawPtrWillBeMember<Page> m_page; 97 RawPtrWillBeMember<Page> m_page;
89 const OwnPtr<PinchViewport> m_pinchViewport; 98 const OwnPtr<PinchViewport> m_pinchViewport;
90 const OwnPtrWillBeMember<EventHandlerRegistry> m_eventHandlerRegistry; 99 const OwnPtrWillBeMember<EventHandlerRegistry> m_eventHandlerRegistry;
91 100
92 AtomicString m_overrideEncoding; 101 AtomicString m_overrideEncoding;
102 int m_frameCount;
93 }; 103 };
94 104
95 } 105 }
96 106
97 #endif // FrameHost_h 107 #endif // FrameHost_h
OLDNEW
« no previous file with comments | « Source/core/frame/FrameClient.h ('k') | Source/core/frame/FrameHost.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698