We add the alignment offset to `mPendingCmdPos` before checking whether or not the new command will fit: https://searchfox.org/mozilla-central/rev/4496b3ed9bb535832e4826f09fbcb645b559a32d/dom/canvas/WebGLChild.cpp#63 If we fail, we flush: https://searchfox.org/mozilla-central/rev/4496b3ed9bb535832e4826f09fbcb645b559a32d/dom/canvas/WebGLChild.cpp#67 And use `mPendingCmdPos` as the length: https://searchfox.org/mozilla-central/rev/4496b3ed9bb535832e4826f09fbcb645b559a32d/dom/canvas/WebGLChild.cpp#80 If that exceeds the allocated size of the buffer, the mapping will fail.
Bug 1909490 Comment 7 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
We add the alignment offset to `mPendingCmdsPos` before checking whether or not the new command will fit: https://searchfox.org/mozilla-central/rev/4496b3ed9bb535832e4826f09fbcb645b559a32d/dom/canvas/WebGLChild.cpp#63 If we fail, we flush: https://searchfox.org/mozilla-central/rev/4496b3ed9bb535832e4826f09fbcb645b559a32d/dom/canvas/WebGLChild.cpp#67 And use `mPendingCmdsPos` as the length: https://searchfox.org/mozilla-central/rev/4496b3ed9bb535832e4826f09fbcb645b559a32d/dom/canvas/WebGLChild.cpp#80 If that exceeds the allocated size of the buffer, the mapping will fail.