GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still https://gitweb.torproject.org/ https://git.torproject.org/ and git-rw.torproject.org.

Commit f5b80347 authored by Steve Fink's avatar Steve Fink

Bug 1684122 - Demarcate region where GC would break stuff. r=jgilbert, a=RyanVM

Differential Revision: https://phabricator.services.mozilla.com/D100427
parent 29a1c2e7
......@@ -3934,6 +3934,10 @@ void ClientWebGLContext::TexImage(uint8_t funcDims, GLenum imageTarget,
// -
// Demarcate the region within which GC is disallowed. Typed arrays can move
// their data during a GC, so this will allow the rooting hazard analysis to
// report if a GC is possible while any data pointers extracted from the
// typed array are still live.
dom::Uint8ClampedArray scopedArr;
// -
......@@ -4007,7 +4011,10 @@ void ClientWebGLContext::TexImage(uint8_t funcDims, GLenum imageTarget,
return Some(webgl::TexUnpackBlobDesc{
imageTarget, explicitSize, gfxAlphaType::NonPremult, {}, {}});
}();
if (!desc) return;
if (!desc) {
scopedArr.Reset();
return;
}
// -
// Further, for uploads from TexImageSource, implied UNPACK_ROW_LENGTH and
......@@ -4041,6 +4048,7 @@ void ClientWebGLContext::TexImage(uint8_t funcDims, GLenum imageTarget,
EnqueueError(LOCAL_GL_INVALID_OPERATION,
"Non-DOM-Element uploads with alpha-premult"
" or y-flip do not support subrect selection.");
scopedArr.Reset(); // (For the hazard analysis) Done with the data.
return;
}
}
......@@ -4052,6 +4060,7 @@ void ClientWebGLContext::TexImage(uint8_t funcDims, GLenum imageTarget,
desc->Shrink(pi);
Run<RPROC(TexImage)>(static_cast<uint32_t>(level), respecFormat,
CastUvec3(offset), pi, std::move(*desc));
scopedArr.Reset(); // (For the hazard analysis) Done with the data.
}
void ClientWebGLContext::CompressedTexImage(bool sub, uint8_t funcDims,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment