fix: per-context WebGL overrides when launch parameters are set - #608
Open
PopcornDev1 wants to merge 2 commits into
Open
fix: per-context WebGL overrides when launch parameters are set#608PopcornDev1 wants to merge 2 commits into
PopcornDev1 wants to merge 2 commits into
Conversation
Contributor
Author
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes a WebGL spoofing precedence issue where launch-level
webGl:parametersentries for
UNMASKED_VENDOR_WEBGLandUNMASKED_RENDERER_WEBGLcould overrideper-context WebGL vendor/renderer values.
The affected WebGL constants are:
37445/UNMASKED_VENDOR_WEBGL37446/UNMASKED_RENDERER_WEBGLPreviously,
ClientWebGLContext::GetParameter()checked the genericMaskConfig::GLParam()path before the existing per-contextWebGLParamsManagerpath. If the launch fingerprint includedwebGl:parameters["37445"]orwebGl:parameters["37446"], those global valueswon even when a context had its own WebGL vendor/renderer configured.
This change skips the generic parameter lookup for those two debug-renderer
constants so the existing order is preserved:
WEBGL_debug_renderer_infoto be enabled.webGl:vendor/webGl:renderer.Testing
webGl:vendor/webGl:renderer.webGl:parameters["37445"]/["37446"].NewContextpresets apply WebGL vendor/renderer values.Verified locally against a rebuilt Camoufox binary:
4 passed
Also verified manually with CreepJS:
webGl:parameters["37445"]/["37446"]values.