Bug 1742914 - Add explicit casts for u8 and u16 parameters to RLBox sandbox_invoke r=bholley

Differential Revision: https://phabricator.services.mozilla.com/D132113
This commit is contained in:
Shravan Narayan 2021-11-25 05:17:33 +00:00
parent a543cd6cc8
commit 361d7f84bb

View File

@ -1631,7 +1631,11 @@ void nsExpatDriver::MaybeStopParser(nsresult aState) {
// with false as the last argument). If the parser should be blocked or
// interrupted we need to pause Expat (by calling XML_StopParser with
// true as the last argument).
RLBOX_EXPAT_MCALL(MOZ_XML_StopParser, BlockedOrInterrupted());
// Note that due to Bug 1742913, we need to explicitly cast the parameter to
// an int so that the value is correctly zero extended.
int resumable = BlockedOrInterrupted();
RLBOX_EXPAT_MCALL(MOZ_XML_StopParser, resumable);
} else if (NS_SUCCEEDED(mInternalState)) {
// Only clobber mInternalState with the success code if we didn't block or
// interrupt before.