New issue
Advanced search Search tips

Issue 851126 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

"while (true) { Notification.requestPermission(); }" freezes DevTools

Project Member Reported by l...@chromium.org, Jun 8 2018

Issue description

What steps will reproduce the problem?
(1) Open DevTools' Console and make sure violations are hidden
(2) Go to any page that triggers `Notification.requestPermission()` many times, e.g.
http://jsfiddle.net/e47b395a/1/

What is the expected result?
DevTools should not freeze.

What happens instead?
A large (1000+) number of violations will flood the Console with "Only request notification permission in response to a user gesture." messages, making DevTools unresponsive.

 
Project Member

Comment 1 by bugdroid1@chromium.org, Jun 11 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a7449532f628ffe5b05140d6c91f771f31af9606

commit a7449532f628ffe5b05140d6c91f771f31af9606
Author: Erik Luo <luoe@chromium.org>
Date: Mon Jun 11 22:16:45 2018

DevTools: fix slow filtering of console violations

When there is a violation group with thousands of messages, Console marks all
of them all as 'seen', but fails to mark the group as 'seen'. This leads to a
O(n^2) runtime when filtering. This CL marks groups as 'seen' in this case,
reducing a 3+ second filter on 5000 violations to <500ms.

Screenshot: https://imgur.com/a/ikWo1My

Bug:  851126 
Change-Id: I69f5c87ca72c06efd4e305a19eb88d90316161b7
Reviewed-on: https://chromium-review.googlesource.com/1094254
Commit-Queue: Erik Luo <luoe@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#566169}
[modify] https://crrev.com/a7449532f628ffe5b05140d6c91f771f31af9606/third_party/WebKit/LayoutTests/http/tests/devtools/console/console-group-similar.js
[modify] https://crrev.com/a7449532f628ffe5b05140d6c91f771f31af9606/third_party/blink/renderer/devtools/front_end/console/ConsoleView.js

Comment 2 by l...@chromium.org, Jun 11 2018

Cc: paulir...@chromium.org
@paul, this should address cases where thousands of browser messages are logged to the console.

Comment 3 by l...@chromium.org, Jun 11 2018

Status: Fixed (was: Assigned)
this is great! nice one.

Sign in to add a comment