зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1803386 - Part 2: Remove ReadableStream::ReleaseObjectsFromBodyStream r=smaug
No point to release a stream holder that is then nullified. Holding an empty holder is totally fine. Differential Revision: https://phabricator.services.mozilla.com/D166534
This commit is contained in:
Родитель
ac006ba3c4
Коммит
2ac5fcd132
|
@ -598,11 +598,6 @@ void BodyStream::ReleaseObjects(const MutexSingleWriterAutoLock& aProofOfLock) {
|
|||
}
|
||||
}
|
||||
|
||||
ReadableStream* stream = mStreamHolder->GetReadableStreamBody();
|
||||
if (stream) {
|
||||
stream->ReleaseObjectsFromBodyStream();
|
||||
}
|
||||
|
||||
mWorkerRef = nullptr;
|
||||
mGlobal = nullptr;
|
||||
|
||||
|
|
|
@ -135,13 +135,6 @@ bool ReadableStreamHasDefaultReader(ReadableStream* aStream) {
|
|||
return reader->IsDefault();
|
||||
}
|
||||
|
||||
void ReadableStream::ReleaseObjectsFromBodyStream() {
|
||||
// XXX(krosylight): Hacky way to workaround the ownership issue between
|
||||
// BodyStream and ReadableStream trying to cleanup each other. See bug
|
||||
// 1803386.
|
||||
mController->ClearAlgorithmsWithoutRelease();
|
||||
}
|
||||
|
||||
// Streams Spec: 4.2.4: https://streams.spec.whatwg.org/#rs-prototype
|
||||
/* static */
|
||||
already_AddRefed<ReadableStream> ReadableStream::Constructor(
|
||||
|
|
|
@ -94,10 +94,6 @@ class ReadableStream : public nsISupports, public nsWrapperCache {
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
// XXX(krosylight): BodyStream should really be a subclass of ReadableStream
|
||||
// instead of owning ReadableStream this way. See bug 1803386.
|
||||
void ReleaseObjectsFromBodyStream();
|
||||
|
||||
// [Transferable]
|
||||
// https://html.spec.whatwg.org/multipage/structured-data.html#transfer-steps
|
||||
MOZ_CAN_RUN_SCRIPT bool Transfer(JSContext* aCx,
|
||||
|
|
|
@ -53,11 +53,6 @@ class ReadableStreamController : public nsISupports {
|
|||
mAlgorithms = nullptr;
|
||||
}
|
||||
|
||||
// XXX(krosylight): Hacky way to workaround the ownership issue between
|
||||
// BodyStream and ReadableStream trying to cleanup each other. See bug
|
||||
// 1803386.
|
||||
void ClearAlgorithmsWithoutRelease() { mAlgorithms = nullptr; }
|
||||
|
||||
protected:
|
||||
nsCOMPtr<nsIGlobalObject> mGlobal;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче