зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1752880 - Cleanup ErrorResult naming style r=saschanaz
Differential Revision: https://phabricator.services.mozilla.com/D143413
This commit is contained in:
Родитель
97c021a7ba
Коммит
604560c365
|
@ -26,18 +26,18 @@ struct ReadIntoRequest : public nsISupports,
|
||||||
|
|
||||||
// An algorithm taking a chunk, called when a chunk is available for reading
|
// An algorithm taking a chunk, called when a chunk is available for reading
|
||||||
virtual void ChunkSteps(JSContext* aCx, JS::Handle<JS::Value> aChunk,
|
virtual void ChunkSteps(JSContext* aCx, JS::Handle<JS::Value> aChunk,
|
||||||
ErrorResult& errorResult) = 0;
|
ErrorResult& aRv) = 0;
|
||||||
|
|
||||||
// An algorithm taking a chunk or undefined, called when no chunks are
|
// An algorithm taking a chunk or undefined, called when no chunks are
|
||||||
// available because the stream is closed
|
// available because the stream is closed
|
||||||
MOZ_CAN_RUN_SCRIPT
|
MOZ_CAN_RUN_SCRIPT
|
||||||
virtual void CloseSteps(JSContext* aCx, JS::Handle<JS::Value> aChunk,
|
virtual void CloseSteps(JSContext* aCx, JS::Handle<JS::Value> aChunk,
|
||||||
ErrorResult& errorResult) = 0;
|
ErrorResult& aRv) = 0;
|
||||||
|
|
||||||
// An algorithm taking a JavaScript value, called when no chunks are available
|
// An algorithm taking a JavaScript value, called when no chunks are available
|
||||||
// because the stream is errored
|
// because the stream is errored
|
||||||
virtual void ErrorSteps(JSContext* aCx, JS::Handle<JS::Value> e,
|
virtual void ErrorSteps(JSContext* aCx, JS::Handle<JS::Value> e,
|
||||||
ErrorResult& errorResult) = 0;
|
ErrorResult& aRv) = 0;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual ~ReadIntoRequest() = default;
|
virtual ~ReadIntoRequest() = default;
|
||||||
|
|
|
@ -92,7 +92,7 @@ struct Read_ReadIntoRequest final : public ReadIntoRequest {
|
||||||
explicit Read_ReadIntoRequest(Promise* aPromise) : mPromise(aPromise) {}
|
explicit Read_ReadIntoRequest(Promise* aPromise) : mPromise(aPromise) {}
|
||||||
|
|
||||||
void ChunkSteps(JSContext* aCx, JS::Handle<JS::Value> aChunk,
|
void ChunkSteps(JSContext* aCx, JS::Handle<JS::Value> aChunk,
|
||||||
ErrorResult& errorResult) override {
|
ErrorResult& aRv) override {
|
||||||
MOZ_ASSERT(aChunk.isObject());
|
MOZ_ASSERT(aChunk.isObject());
|
||||||
// https://streams.spec.whatwg.org/#byob-reader-read Step 6.
|
// https://streams.spec.whatwg.org/#byob-reader-read Step 6.
|
||||||
//
|
//
|
||||||
|
@ -115,7 +115,7 @@ struct Read_ReadIntoRequest final : public ReadIntoRequest {
|
||||||
}
|
}
|
||||||
|
|
||||||
void CloseSteps(JSContext* aCx, JS::Handle<JS::Value> aChunk,
|
void CloseSteps(JSContext* aCx, JS::Handle<JS::Value> aChunk,
|
||||||
ErrorResult& errorResult) override {
|
ErrorResult& aRv) override {
|
||||||
MOZ_ASSERT(aChunk.isObject() || aChunk.isUndefined());
|
MOZ_ASSERT(aChunk.isObject() || aChunk.isUndefined());
|
||||||
// https://streams.spec.whatwg.org/#byob-reader-read Step 6.
|
// https://streams.spec.whatwg.org/#byob-reader-read Step 6.
|
||||||
//
|
//
|
||||||
|
@ -139,7 +139,7 @@ struct Read_ReadIntoRequest final : public ReadIntoRequest {
|
||||||
}
|
}
|
||||||
|
|
||||||
void ErrorSteps(JSContext* aCx, JS::Handle<JS::Value> e,
|
void ErrorSteps(JSContext* aCx, JS::Handle<JS::Value> e,
|
||||||
ErrorResult& errorResult) override {
|
ErrorResult& aRv) override {
|
||||||
// https://streams.spec.whatwg.org/#byob-reader-read Step 6.
|
// https://streams.spec.whatwg.org/#byob-reader-read Step 6.
|
||||||
//
|
//
|
||||||
// error steps, given e:
|
// error steps, given e:
|
||||||
|
|
|
@ -862,7 +862,7 @@ class PullWithBYOBReader_ReadIntoRequest final : public ReadIntoRequest {
|
||||||
}
|
}
|
||||||
|
|
||||||
void ErrorSteps(JSContext* aCx, JS::Handle<JS::Value> e,
|
void ErrorSteps(JSContext* aCx, JS::Handle<JS::Value> e,
|
||||||
ErrorResult& errorResult) override {
|
ErrorResult& aRv) override {
|
||||||
// Step 1.
|
// Step 1.
|
||||||
mTeeState->SetReading(false);
|
mTeeState->SetReading(false);
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче