Skip to content

webgl: remove unsafe from webgl extension initialization - #48150

Merged
gterzian merged 2 commits into
servo:mainfrom
gterzian:remove_unsafe_webgl_ext_init
Sep 17, 2026
Merged

gterzian merged 2 commits into
servo:mainfrom
gterzian:remove_unsafe_webgl_ext_init

Conversation

@gterzian

@gterzian gterzian commented Sep 17, 2026 •

Copy link
Copy Markdown
Member

Remove unsafe code from webgl extension initialization, by passing the mutable handle to the js return value down call chain and setting the reflector of the rooted dom object.

Testing: no behavioral change.
Fixes: #30892

@servo-highfive servo-highfive added the S-awaiting-review There is new code that needs to be reviewed. label Sep 17, 2026
@gterzian gterzian changed the title webgl: remove unsafe from webgl extension initialization by passing return v… webgl: remove unsafe from webgl extension initialization Sep 17, 2026
@servo-highfive servo-highfive removed the S-awaiting-review There is new code that needs to be reviewed. label Sep 17, 2026
) {
let name = name.to_uppercase();
self.extensions.borrow().get(&name).and_then(|extension| {
if extension.is_supported(self) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is_supported was removed?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I'll put it back

@servo-highfive servo-highfive added the S-awaiting-review There is new code that needs to be reviewed. label Sep 17, 2026
@gterzian
gterzian enabled auto-merge September 17, 2026 15:37
@gterzian
gterzian added this pull request to the merge queue Sep 17, 2026
@servo-highfive servo-highfive added the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Sep 17, 2026
Merged via the queue into servo:main with commit 0f4d68e Sep 17, 2026
36 checks passed
@gterzian
gterzian deleted the remove_unsafe_webgl_ext_init branch September 17, 2026 18:13
@servo-highfive servo-highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Sep 17, 2026
RichardTjokroutomo pushed a commit to RichardTjokroutomo/servo that referenced this pull request Oct 6, 2026
Remove unsafe code from webgl extension initialization, by passing the
mutable handle to the js return value down call chain and setting the
reflector of the rooted dom object.

Testing: no behavioral change.
Fixes: servo#30892

---------

Signed-off-by: gterzian <[email protected]>
hhhwsqhhh pushed a commit to hhhwsqhhh/servo that referenced this pull request Oct 12, 2026
Remove unsafe code from webgl extension initialization, by passing the
mutable handle to the js return value down call chain and setting the
reflector of the rooted dom object.

Testing: no behavioral change.
Fixes: servo#30892

---------

Signed-off-by: gterzian <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-awaiting-review There is new code that needs to be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WebIDL impl: remove unsafe JSObject from WebGLExtensionWrapper

3 participants