mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-02 13:58:40 +09:00
Issue #1442 - Part 20 - FetchStream should not have an extra JS::Heap<ReadableStream>. https://bugzilla.mozilla.org/show_bug.cgi?id=1390717
This commit is contained in:
parent
0e1efcb273
commit
b1a12de924
3 changed files with 11 additions and 7 deletions
|
|
@ -161,8 +161,6 @@ FetchStream::Create(JSContext* aCx, FetchStreamHolder* aStreamHolder,
|
|||
return;
|
||||
}
|
||||
|
||||
stream->mReadableStream = body;
|
||||
|
||||
// This will be released in FetchStream::FinalizeCallback(). We are
|
||||
// guaranteed the jsapi will call FinalizeCallback when ReadableStream
|
||||
// js object is finalized.
|
||||
|
|
@ -371,7 +369,6 @@ FetchStream::FetchStream(nsIGlobalObject* aGlobal,
|
|||
, mStreamHolder(aStreamHolder)
|
||||
, mOriginalInputStream(aInputStream)
|
||||
, mOwningEventTarget(nullptr)
|
||||
, mReadableStream(nullptr)
|
||||
{
|
||||
MOZ_DIAGNOSTIC_ASSERT(aInputStream);
|
||||
MOZ_DIAGNOSTIC_ASSERT(aStreamHolder);
|
||||
|
|
@ -428,7 +425,7 @@ FetchStream::OnInputStreamReady(nsIAsyncInputStream* aStream)
|
|||
}
|
||||
|
||||
JSContext* cx = jsapi.cx();
|
||||
JS::Rooted<JSObject*> stream(cx, mReadableStream);
|
||||
JS::Rooted<JSObject*> stream(cx, mStreamHolder->ReadableStreamBody());
|
||||
|
||||
uint64_t size = 0;
|
||||
nsresult rv = mInputStream->Available(&size);
|
||||
|
|
@ -494,7 +491,7 @@ FetchStream::Close()
|
|||
}
|
||||
|
||||
JSContext* cx = jsapi.cx();
|
||||
JS::Rooted<JSObject*> stream(cx, mReadableStream);
|
||||
JS::Rooted<JSObject*> stream(cx, mStreamHolder->ReadableStreamBody());
|
||||
|
||||
CloseAndReleaseObjects(cx, stream);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue