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

Side by Side Diff: Source/core/loader/FrameLoader.h

Issue 495743003: Add an extra guard to replaceDocument() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 3 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) 2006, 2007, 2008, 2009, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2011 Apple Inc. All rights reserved.
3 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 3 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
4 * Copyright (C) Research In Motion Limited 2009. All rights reserved. 4 * Copyright (C) Research In Motion Limited 2009. All rights reserved.
5 * Copyright (C) 2011 Google Inc. All rights reserved. 5 * Copyright (C) 2011 Google Inc. All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 10 *
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 static void reportLocalLoadFailed(LocalFrame*, const String& url); 95 static void reportLocalLoadFailed(LocalFrame*, const String& url);
96 96
97 // FIXME: These are all functions which stop loads. We have too many. 97 // FIXME: These are all functions which stop loads. We have too many.
98 // Warning: stopAllLoaders can and will detach the LocalFrame out from under you. All callers need to either protect the LocalFrame 98 // Warning: stopAllLoaders can and will detach the LocalFrame out from under you. All callers need to either protect the LocalFrame
99 // or guarantee they won't in any way access the LocalFrame after stopAllLoa ders returns. 99 // or guarantee they won't in any way access the LocalFrame after stopAllLoa ders returns.
100 void stopAllLoaders(); 100 void stopAllLoaders();
101 void stopLoading(); 101 void stopLoading();
102 bool closeURL(); 102 bool closeURL();
103 // FIXME: clear() is trying to do too many things. We should break it down i nto smaller functions. 103 // FIXME: clear() is trying to do too many things. We should break it down i nto smaller functions.
104 void clear(); 104 void clear();
105 void replaceDocument(const String& source, Document* ownerDocument);
dglazkov 2014/08/26 16:03:32 If it only has one intended callsite, let's name i
105 106
106 // Sets a timer to notify the client that the initial empty document has 107 // Sets a timer to notify the client that the initial empty document has
107 // been accessed, and thus it is no longer safe to show a provisional URL 108 // been accessed, and thus it is no longer safe to show a provisional URL
108 // above the document without risking a URL spoof. 109 // above the document without risking a URL spoof.
109 void didAccessInitialDocument(); 110 void didAccessInitialDocument();
110 111
111 // If the initial empty document is showing and has been accessed, this 112 // If the initial empty document is showing and has been accessed, this
112 // cancels the timer and immediately notifies the client in cases that 113 // cancels the timer and immediately notifies the client in cases that
113 // waiting to notify would allow a URL spoof. 114 // waiting to notify would allow a URL spoof.
114 void notifyIfInitialDocumentAccessed(); 115 void notifyIfInitialDocumentAccessed();
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 Timer<FrameLoader> m_didAccessInitialDocumentTimer; 273 Timer<FrameLoader> m_didAccessInitialDocumentTimer;
273 274
274 SandboxFlags m_forcedSandboxFlags; 275 SandboxFlags m_forcedSandboxFlags;
275 276
276 bool m_willDetachClient; 277 bool m_willDetachClient;
277 }; 278 };
278 279
279 } // namespace blink 280 } // namespace blink
280 281
281 #endif // FrameLoader_h 282 #endif // FrameLoader_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698