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

Unified Diff: third_party/WebKit/Source/core/frame/History.h

Issue 2972073002: Mitigate the pushState IPC storm DoS. (Closed)
Patch Set: Move the check to |StateObjectAdded|. Created 3 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/History.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/frame/History.h
diff --git a/third_party/WebKit/Source/core/frame/History.h b/third_party/WebKit/Source/core/frame/History.h
index fb7fc5ea80e861f79ba6018f86a012daf1056201..45d50059d6e2b16aa95eb6975236ae53c36fe795 100644
--- a/third_party/WebKit/Source/core/frame/History.h
+++ b/third_party/WebKit/Source/core/frame/History.h
@@ -26,6 +26,8 @@
#ifndef History_h
#define History_h
+#include <utility>
+
#include "base/gtest_prod_util.h"
#include "bindings/core/v8/serialization/SerializedScriptValue.h"
#include "core/dom/ContextLifecycleObserver.h"
@@ -33,6 +35,7 @@
#include "platform/bindings/ScriptWrappable.h"
#include "platform/heap/Handle.h"
#include "platform/wtf/Forward.h"
+#include "platform/wtf/HashMap.h"
namespace blink {
@@ -102,7 +105,13 @@ class CORE_EXPORT History final : public GarbageCollectedFinalized<History>,
SerializedScriptValue* StateInternal() const;
HistoryScrollRestorationType ScrollRestorationInternal() const;
+ bool IsHostFloodingPushState(const String& hostname) const;
+
RefPtr<SerializedScriptValue> last_state_object_requested_;
+
+ using HostLimit = std::pair<int, double>;
+ using HostLimits = HashMap<String, HostLimit>;
+ mutable HostLimits host_limits;
dcheng 2017/07/06 23:03:40 As history is tied to the Window object, shall we
palmer 2017/07/06 23:53:06 Do you mean we don't need to keep track of the hos
};
} // namespace blink
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/History.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698