Reland "Prevent renderer process flooding the browser with IPC."

 * Initial :
 * Revert  :
 * 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.,

Bug: 882238
Change-Id: Iacab2f76dffa889bfd508fedf47f6e840627dbc7
Reviewed-by: Nasko Oskov <>
Reviewed-by: Arthur Sonzogni <>
Commit-Queue: Arthur Sonzogni <>
Cr-Commit-Position: refs/heads/master@{#604305}
25 files changed