Reland "Prevent renderer process flooding the browser with IPC."
History:
=======
* Initial : https://chromium-review.googlesource.com/1230067
* Revert : https://chromium-review.googlesource.com/1265060
* Reland : This CL.
Cause of revert:
================
The tests depended on timing. On slow bots, it was failing.
Instead of checking the number of IPCs sent was below 100_IPC/10_s, the
new tests only check for the console error message to be displayed.
Since this is not possible to send a console message to a remote frame,
the last test has been removed.
Original description:
=====================
Some javascript function called in an infinite loop can cause the
browser process to be flooded by IPC and become unresponsive.
Limit the number of IPC sent to 10 per second per frame.
This was already done for:
- history.pushState()
- history.replaceState()
This is extended to:
- history.back()
- history.forward()
- history.go()
- navigations...
3 tests added.
[email protected]
[email protected],[email protected]
Bug: 882238
Change-Id: Iacab2f76dffa889bfd508fedf47f6e840627dbc7
Reviewed-on: https://chromium-review.googlesource.com/c/1268016
Reviewed-by: Nasko Oskov <[email protected]>
Reviewed-by: Arthur Sonzogni <[email protected]>
Commit-Queue: Arthur Sonzogni <[email protected]>
Cr-Commit-Position: refs/heads/master@{#604305}
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index 30424566..5466d05 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -1472,6 +1472,10 @@
flag_descriptions::kDisablePushStateThrottleName,
flag_descriptions::kDisablePushStateThrottleDescription, kOsAll,
SINGLE_VALUE_TYPE(switches::kDisablePushStateThrottle)},
+ {"disable-ipc-flooding-protection",
+ flag_descriptions::kDisableIpcFloodingProtectionName,
+ flag_descriptions::kDisableIpcFloodingProtectionDescription, kOsAll,
+ SINGLE_VALUE_TYPE(switches::kDisableIpcFloodingProtection)},
{"disable-hyperlink-auditing", flag_descriptions::kHyperlinkAuditingName,
flag_descriptions::kHyperlinkAuditingDescription, kOsAll,
SINGLE_DISABLE_VALUE_TYPE(switches::kNoPings)},