Skip to content

When offscreen canvas is used with threads disabled it changes sizes incorrectly #26394

@NoctemCat

Description

@NoctemCat

Version of emscripten/emsdk:
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 5.0.2 (dc80f64)
clang version 23.0.0git (https:/github.com/llvm/llvm-project 58f4da463e5b3cd3531cace17cc3f2d8d860964e)
Target: wasm32-unknown-emscripten
Thread model: posix

The methods themselves are emscripten_get_canvas_element_size and emscripten_set_canvas_element_size. After manually including the fix from #23518 in the final js it works correctly. More accurately it sets the sizes on the wrong object, if the comment is correct, it sets it on the offscreen canvas record.

Edit: Looked more closely at the code and seems like it actually only an issue if threads are disabled. Honestly offscreen canvas is unlikely to be used without threads, but I'm going to guess it is allowed if there is no errors

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions