Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Merge m101][Extensions] Fix inadvertent leakage of info through even…
…t listeners. Different extension event implementations (e.g. tabs.onCreated) can tweak their listener params through Event::WillDispatchCallback callback. It does so by passing mutable Event* to WillDispatchCallback. This can lead to one extension's event listener inadvertently affecting a different extension's event listener, as the (modified) `Event*` is carried over to next/subsequent listeners. This CL changes this by removing the mutable Event param from WillDispatchCallback, and exposes "writable" `event_args_out` and `event_filtering_info_out` params to WillDispatchCallback. This is done so that interested parties can set those modified params to be used by dispatcher (EventRouter::DispatchExtensionMessage). Note that events funneled through LazyEventDispatcher is not currently susceptible to this problem as it copies Event-s before dispatching them. (cherry picked from commit 940ddcf) Bug: 1302959 Change-Id: I07c2bfd68b62412f93dcb5fd46315e3b4b496ddd Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3531082 Reviewed-by: Devlin Cronin <rdevlin.cronin@chromium.org> Commit-Queue: Istiaque Ahmed <lazyboy@chromium.org> Cr-Original-Commit-Position: refs/heads/main@{#985564} Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3584544 Reviewed-by: David Bertoni <dbertoni@chromium.org> Cr-Commit-Position: refs/branch-heads/4951@{#707} Cr-Branched-From: 27de622-refs/heads/main@{#982481}
- Loading branch information
Istiaque Ahmed
authored and
Chromium LUCI CQ
committed
Apr 12, 2022
1 parent
b47a9c4
commit f1359aa
Showing
11 changed files
with
189 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.