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,robwu

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: 9d33a3994005a05a8fbc4ad307e4bd6fb4ab2a63
  • Loading branch information
marco-c committed Feb 1, 2024
1 parent 81dee0b commit a4bd5bc
Show file tree
Hide file tree
Showing 5 changed files with 1,225 additions and 0 deletions.
13 changes: 13 additions & 0 deletions browser/components/extensions/test/browser/browser.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2009,6 +2009,13 @@ js
]
[
"
browser_ext_runtime_onPerformanceWarning
.
js
"
]
[
"
browser_ext_runtime_openOptionsPage
.
js
Expand Down Expand Up @@ -2330,6 +2337,12 @@ debug
"
asan
"
"
tsan
"
#
Bug
1874317
]
[
"
Expand Down
Loading

0 comments on commit a4bd5bc

Please sign in to comment.