-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change how 3D API blocking is implemented
This moves the query for 3D API blocking policy back to the IO thread with the document URL provided by the renderer again. The IO thread is used to reduce sync IPC hangs in renderers using WebGL, and the origin is trusted from the renderer (a) to avoid racy coordination between IO and UI thread and (b) because this is not a security-sensitive decision. Fixed: 1119941 Change-Id: Ica47eb137c1e28a7e754b753f2356266e8b9d659 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2380345 Commit-Queue: Aaron Colwell <[email protected]> Auto-Submit: Ken Rockot <[email protected]> Reviewed-by: Aaron Colwell <[email protected]> Reviewed-by: Daniel Cheng <[email protected]> Reviewed-by: Kenneth Russell <[email protected]> Cr-Commit-Position: refs/heads/master@{#804339} GitOrigin-RevId: 2895839005437f978123678fea27b806d17c4c08
- Loading branch information
1 parent
0eb44eb
commit 2b1731c
Showing
9 changed files
with
56 additions
and
15 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Copyright 2020 The Chromium Authors. All rights reserved. | ||
# Use of this source code is governed by a BSD-style license that can be | ||
# found in the LICENSE file. | ||
|
||
import("//mojo/public/tools/bindings/mojom.gni") | ||
|
||
mojom_component("gpu") { | ||
output_prefix = "blink_gpu_mojom" | ||
macro_prefix = "BLINK_GPU_MOJOM" | ||
|
||
sources = [ "gpu.mojom" ] | ||
public_deps = [ "//url/mojom:url_mojom_gurl" ] | ||
|
||
# It's important to specify these settings for Blink bindings, because the | ||
# URL dependency above requires direct linkage into the platform library. | ||
export_class_attribute_blink = "PLATFORM_EXPORT" | ||
export_define_blink = "BLINK_PLATFORM_IMPLEMENTATION=1" | ||
export_header_blink = "third_party/blink/renderer/platform/platform_export.h" | ||
|
||
generate_java = true | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
per-file *.mojom=set noparent | ||
per-file *.mojom=file://ipc/SECURITY_OWNERS |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Copyright 2020 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
module blink.mojom; | ||
|
||
import "url/mojom/url.mojom"; | ||
|
||
// An interface used by frames to query the browser about tracked GPU state. | ||
interface GpuDataManager { | ||
// Asks whether or not `url` is allowed to use 3D APIs. | ||
// | ||
// Note that the renderer can ignore the result of this check, so this is | ||
// currently not considered security-sensitive. As a temporary exception, pass | ||
// the URL rather than routing this method via the frame. | ||
[Sync] | ||
Are3DAPIsBlockedForUrl(url.mojom.Url url) => (bool blocked); | ||
}; |
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