mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-08-15 08:53:07 +09:00
Merge remote-tracking branch 'origin/tracking' into custom
This commit is contained in:
commit
ad0a69ae15
2 changed files with 11 additions and 6 deletions
|
|
@ -537,8 +537,12 @@ JSObject*
|
|||
PromiseObject::resolutionSite()
|
||||
{
|
||||
auto debugInfo = PromiseDebugInfo::FromPromise(this);
|
||||
if (debugInfo)
|
||||
return debugInfo->resolutionSite();
|
||||
if (debugInfo) {
|
||||
JSObject* site = debugInfo->resolutionSite();
|
||||
if (site && !JS_IsDeadWrapper(site)) {
|
||||
return site;
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -755,13 +755,14 @@ TransactionObserver::OnDataAvailable(nsIRequest *aRequest, nsISupports *aContext
|
|||
nsIInputStream *aStream, uint64_t aOffset, uint32_t aCount)
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
uint64_t newLen = aCount + mWKResponse.Length();
|
||||
uint64_t oldLen = static_cast<uint64_t>(mWKResponse.Length());
|
||||
uint64_t newLen = static_cast<uint64_t>(aCount) + oldLen;
|
||||
if (newLen < MAX_WK) {
|
||||
char *startByte = reinterpret_cast<char *>(mWKResponse.BeginWriting()) + mWKResponse.Length();
|
||||
char *startByte = reinterpret_cast<char *>(mWKResponse.BeginWriting()) + oldLen;
|
||||
uint32_t amtRead;
|
||||
if (NS_SUCCEEDED(aStream->Read(startByte, aCount, &amtRead))) {
|
||||
MOZ_ASSERT(mWKResponse.Length() + amtRead < MAX_WK);
|
||||
mWKResponse.SetLength(mWKResponse.Length() + amtRead);
|
||||
MOZ_ASSERT(oldLen + amtRead < MAX_WK);
|
||||
mWKResponse.SetLength(oldLen + amtRead);
|
||||
LOG(("TransactionObserver onDataAvailable %p read %d of .wk [%d]\n",
|
||||
this, amtRead, mWKResponse.Length()));
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue