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

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

Issue 2972073002: Mitigate the pushState IPC storm DoS. (Closed)
Patch Set: Make the test work (thanks dcheng!), move the flooding test per kinuko. 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
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..9c2f875046200c8b8ebfe6d14886cfc770a83630 100644
--- a/third_party/WebKit/Source/core/frame/History.h
+++ b/third_party/WebKit/Source/core/frame/History.h
@@ -33,6 +33,7 @@
#include "platform/bindings/ScriptWrappable.h"
#include "platform/heap/Handle.h"
#include "platform/wtf/Forward.h"
+#include "platform/wtf/Time.h"
namespace blink {
@@ -102,7 +103,13 @@ class CORE_EXPORT History final : public GarbageCollectedFinalized<History>,
SerializedScriptValue* StateInternal() const;
HistoryScrollRestorationType ScrollRestorationInternal() const;
+ bool ShouldThrottleStateObjectChanges();
+
RefPtr<SerializedScriptValue> last_state_object_requested_;
+ struct {
+ int count;
+ TimeTicks last_updated;
+ } state_flood_guard;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698