Skip to content

Commit

Permalink
Bug 1861445 - Add the runtime.onPerformanceWarning WebExtension event…
Browse files Browse the repository at this point in the history
… r=zombie

When an extension's content script is very slow and causes a webpage
to hang noticeably, a warning banner is displayed to the user. It
would be useful to also notify the extension developer when that
happens, so that they can address the issue.

Let's add a new event runtime.onPerformanceWarning that can be
dispatched when the browser needs to warn an extension of runtime
performance issues. For now, let's just dispatch that event when the
slow extension warning banner is displayed to the user.

See also w3c/webextensions#456

Differential Revision: https://phabricator.services.mozilla.com/D194708

UltraBlame original commit: 199b3c24b8b43b8053831d7c287bbe83e43037c4
  • Loading branch information
marco-c committed Jan 16, 2024
1 parent 208c7d9 commit 802ff27
Show file tree
Hide file tree
Showing 5 changed files with 1,317 additions and 0 deletions.
7 changes: 7 additions & 0 deletions browser/components/extensions/test/browser/browser.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2025,6 +2025,13 @@ js
]
[
"
browser_ext_runtime_onPerformanceWarning
.
js
"
]
[
"
browser_ext_runtime_openOptionsPage
.
js
Expand Down
Loading

0 comments on commit 802ff27

Please sign in to comment.