зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1128959 - Implement the WHATWG Streams spec - part 2 - Use of ReadableStream in WebIDL files, r=bkelly
This commit is contained in:
Родитель
42e07522e8
Коммит
99819a81c8
|
@ -925,5 +925,24 @@ template
|
|||
void
|
||||
FetchBody<Response>::SetMimeType();
|
||||
|
||||
template <class Derived>
|
||||
void
|
||||
FetchBody<Derived>::GetBody(JSContext* aCx,
|
||||
JS::MutableHandle<JSObject*> aMessage)
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
template
|
||||
void
|
||||
FetchBody<Request>::GetBody(JSContext* aCx,
|
||||
JS::MutableHandle<JSObject*> aMessage);
|
||||
|
||||
template
|
||||
void
|
||||
FetchBody<Response>::GetBody(JSContext* aCx,
|
||||
JS::MutableHandle<JSObject*> aMessage);
|
||||
|
||||
|
||||
} // namespace dom
|
||||
} // namespace mozilla
|
||||
|
|
|
@ -155,6 +155,10 @@ public:
|
|||
return ConsumeBody(CONSUME_TEXT, aRv);
|
||||
}
|
||||
|
||||
void
|
||||
GetBody(JSContext* aCx,
|
||||
JS::MutableHandle<JSObject*> aMessage);
|
||||
|
||||
// Utility public methods accessed by various runnables.
|
||||
|
||||
void
|
||||
|
|
|
@ -129,6 +129,8 @@ public:
|
|||
void
|
||||
GetBody(nsIInputStream** aStream) { return mRequest->GetBody(aStream); }
|
||||
|
||||
using FetchBody::GetBody;
|
||||
|
||||
void
|
||||
SetBody(nsIInputStream* aStream) { return mRequest->SetBody(aStream); }
|
||||
|
||||
|
|
|
@ -106,6 +106,8 @@ public:
|
|||
void
|
||||
GetBody(nsIInputStream** aStream) { return mInternalResponse->GetBody(aStream); }
|
||||
|
||||
using FetchBody::GetBody;
|
||||
|
||||
static already_AddRefed<Response>
|
||||
Error(const GlobalObject& aGlobal);
|
||||
|
||||
|
|
|
@ -30,6 +30,12 @@ interface Response {
|
|||
};
|
||||
Response implements Body;
|
||||
|
||||
// This should be part of Body but we don't want to expose body to request yet.
|
||||
// See bug 1387483.
|
||||
partial interface Response {
|
||||
readonly attribute ReadableStream? body;
|
||||
};
|
||||
|
||||
dictionary ResponseInit {
|
||||
unsigned short status = 200;
|
||||
ByteString statusText = "OK";
|
||||
|
|
Загрузка…
Ссылка в новой задаче