mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-01 04:47:31 +09:00
Merge remote-tracking branch 'origin/tracking' into custom
This commit is contained in:
commit
462805f0ee
4 changed files with 49 additions and 18 deletions
|
|
@ -154,6 +154,10 @@ nsJPEGDecoder::InitInternal()
|
||||||
mSourceMgr.skip_input_data = skip_input_data;
|
mSourceMgr.skip_input_data = skip_input_data;
|
||||||
mSourceMgr.resync_to_restart = jpeg_resync_to_restart;
|
mSourceMgr.resync_to_restart = jpeg_resync_to_restart;
|
||||||
mSourceMgr.term_source = term_source;
|
mSourceMgr.term_source = term_source;
|
||||||
|
|
||||||
|
// Limit the maximum allocation to the maximum our surface cache can hold.
|
||||||
|
mInfo.mem->max_memory_to_use = static_cast<long>(
|
||||||
|
std::min<size_t>(SurfaceCache::MaximumCapacity(), LONG_MAX));
|
||||||
|
|
||||||
// Record app markers for ICC data
|
// Record app markers for ICC data
|
||||||
for (uint32_t m = 0; m < 16; m++) {
|
for (uint32_t m = 0; m < 16; m++) {
|
||||||
|
|
|
||||||
|
|
@ -1398,6 +1398,8 @@ pref("network.protocol-handler.external.shell", false);
|
||||||
pref("network.protocol-handler.external.vbscript", false);
|
pref("network.protocol-handler.external.vbscript", false);
|
||||||
pref("network.protocol-handler.external.vnd.ms.radio", false);
|
pref("network.protocol-handler.external.vnd.ms.radio", false);
|
||||||
#ifdef XP_WIN
|
#ifdef XP_WIN
|
||||||
|
pref("network.protocol-handler.external.ms-cxh", false);
|
||||||
|
pref("network.protocol-handler.external.ms-cxh-full", false);
|
||||||
pref("network.protocol-handler.external.ms-help", false);
|
pref("network.protocol-handler.external.ms-help", false);
|
||||||
pref("network.protocol-handler.external.ms-msdt", false);
|
pref("network.protocol-handler.external.ms-msdt", false);
|
||||||
pref("network.protocol-handler.external.search", false);
|
pref("network.protocol-handler.external.search", false);
|
||||||
|
|
|
||||||
|
|
@ -201,9 +201,11 @@ static DllBlockInfo sWindowsDllBlocklist[] = {
|
||||||
// ESET, bug 1229252
|
// ESET, bug 1229252
|
||||||
{ "eoppmonitor.dll", ALL_VERSIONS },
|
{ "eoppmonitor.dll", ALL_VERSIONS },
|
||||||
|
|
||||||
// SS2OSD, bug 1262348
|
// SS2OSD, Sonic Studio, bugs 1262348, 1540883
|
||||||
{ "ss2osd.dll", ALL_VERSIONS },
|
{ "ss2osd.dll", ALL_VERSIONS },
|
||||||
|
{ "ss3osd.dll", ALL_VERSIONS },
|
||||||
{ "ss2devprops.dll", ALL_VERSIONS },
|
{ "ss2devprops.dll", ALL_VERSIONS },
|
||||||
|
{ "ss3devprops.dll", ALL_VERSIONS },
|
||||||
|
|
||||||
// NHASUSSTRIXOSD.DLL, bug 1269244
|
// NHASUSSTRIXOSD.DLL, bug 1269244
|
||||||
{ "nhasusstrixosd.dll", ALL_VERSIONS },
|
{ "nhasusstrixosd.dll", ALL_VERSIONS },
|
||||||
|
|
|
||||||
|
|
@ -121,25 +121,48 @@ nsDataObj::CStream::OnDataAvailable(nsIRequest *aRequest,
|
||||||
uint64_t aOffset, // offset within the stream
|
uint64_t aOffset, // offset within the stream
|
||||||
uint32_t aCount) // bytes available on this call
|
uint32_t aCount) // bytes available on this call
|
||||||
{
|
{
|
||||||
// Extend the write buffer for the incoming data.
|
// If we've been asked to read zero bytes, call `Read` once, just to ensure
|
||||||
uint8_t* buffer = mChannelData.AppendElements(aCount, fallible);
|
// any side-effects take place, and return immediately.
|
||||||
if (!buffer) {
|
if (aCount == 0) {
|
||||||
return NS_ERROR_OUT_OF_MEMORY;
|
char buffer[1] = {0};
|
||||||
}
|
uint32_t bytesReadByCall = 0;
|
||||||
NS_ASSERTION((mChannelData.Length() == (aOffset + aCount)),
|
nsresult rv = aInputStream->Read(buffer, 0, &bytesReadByCall);
|
||||||
"stream length mismatch w/write buffer");
|
MOZ_ASSERT(bytesReadByCall == 0);
|
||||||
|
|
||||||
// Read() may not return aCount on a single call, so loop until we've
|
|
||||||
// accumulated all the data OnDataAvailable has promised.
|
|
||||||
nsresult rv;
|
|
||||||
uint32_t odaBytesReadTotal = 0;
|
|
||||||
do {
|
|
||||||
uint32_t bytesReadByCall = 0;
|
|
||||||
rv = aInputStream->Read((char*)(buffer + odaBytesReadTotal),
|
|
||||||
aCount, &bytesReadByCall);
|
|
||||||
odaBytesReadTotal += bytesReadByCall;
|
|
||||||
} while (aCount < odaBytesReadTotal && NS_SUCCEEDED(rv));
|
|
||||||
return rv;
|
return rv;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Extend the write buffer for the incoming data.
|
||||||
|
size_t oldLength = mChannelData.Length();
|
||||||
|
char* buffer = reinterpret_cast<char*>(mChannelData.AppendElements(aCount, fallible));
|
||||||
|
if (!buffer) {
|
||||||
|
return NS_ERROR_OUT_OF_MEMORY;
|
||||||
|
}
|
||||||
|
MOZ_ASSERT(mChannelData.Length() == (aOffset + aCount),
|
||||||
|
"stream length mismatch w/write buffer");
|
||||||
|
|
||||||
|
// Read() may not return aCount on a single call, so loop until we've
|
||||||
|
// accumulated all the data OnDataAvailable has promised.
|
||||||
|
uint32_t bytesRead = 0;
|
||||||
|
while (bytesRead < aCount) {
|
||||||
|
uint32_t bytesReadByCall = 0;
|
||||||
|
nsresult rv = aInputStream->Read(buffer + bytesRead, aCount - bytesRead,
|
||||||
|
&bytesReadByCall);
|
||||||
|
bytesRead += bytesReadByCall;
|
||||||
|
|
||||||
|
if (bytesReadByCall == 0) {
|
||||||
|
// A `bytesReadByCall` of zero indicates EOF without failure... but we
|
||||||
|
// were promised `aCount` elements and haven't gotten them. Return a
|
||||||
|
// generic failure.
|
||||||
|
rv = NS_ERROR_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (NS_FAILED(rv)) {
|
||||||
|
// Drop any trailing uninitialized elements before erroring out.
|
||||||
|
mChannelData.RemoveElementsAt(oldLength + bytesRead, aCount - bytesRead);
|
||||||
|
return rv;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP nsDataObj::CStream::OnStartRequest(nsIRequest *aRequest,
|
NS_IMETHODIMP nsDataObj::CStream::OnStartRequest(nsIRequest *aRequest,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue