commit | 6a5d5e7839407b437744ce3f2ad366799c8df3b8 | [log] [tgz] |
---|---|---|
author | Colin Blundell <blundell@chromium.org> | Tue Sep 17 06:34:12 2024 |
committer | Chromium LUCI CQ <chromium-scoped@luci-project-accounts.iam.gserviceaccount.com> | Tue Sep 17 06:34:12 2024 |
tree | 75113e556cebc58f20c936905f3bc39fad3d5c55 | |
parent | d65b3bafa6e7ae10f85acf53a475f03242319277 [diff] |
[Blink] Have Canvas2DLayerBridge take in CanvasResourceHost in ctor Currently, Canvas2DLayerBridge initializes `resource_host_` to null and has its `resource_host_` instance assigned separately to its creation. However, in practice `resource_host_` is always assigned prior to usage of Canvas2DLayerBridge, and in fact this *must* be the case: * No method null-checks `resource_host_` before dereferencing it * ~Every method CHECKs that `resource_host_` is non-null on entry To simplify the logical flow here, this CL has Canvas2DLayerBridge take in the CanvasResourceHost instance in its constructor rather than having it be assigned later. Every construction site passes a non-null CanvasResourceHost instance, meaning that we can move the CHECK that is currently at individual method entrypoints into the C2DLayerBridge constructor. In production this boils down to having HTMLCanvasElement pass itself to Canvas2DLayerBridge on construction rather than doing so separately. All other flows are for tests only. Change-Id: I763d9beea1d2d215c102aa3cb58315e32507d241 Bug: 40280152 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5853969 Reviewed-by: Jean-Philippe Gravel <jpgravel@chromium.org> Commit-Queue: Colin Blundell <blundell@chromium.org> Auto-Submit: Colin Blundell <blundell@chromium.org> Reviewed-by: Philip Rogers <pdr@chromium.org> Cr-Commit-Position: refs/heads/main@{#1356298}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
To check out the source code locally, don't use git clone
! Instead, follow the instructions on how to get the code.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure.
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.
If you found a bug, please file it at https://crbug.com/new.